omextra 0.0.0.dev497__tar.gz → 0.0.0.dev498__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (174) hide show
  1. {omextra-0.0.0.dev497/omextra.egg-info → omextra-0.0.0.dev498}/PKG-INFO +2 -2
  2. omextra-0.0.0.dev498/omextra/text/abnf/__init__.py +125 -0
  3. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/text/abnf/_dataclasses.py +246 -0
  4. omextra-0.0.0.dev498/omextra/text/abnf/base.py +44 -0
  5. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/text/abnf/core.py +22 -10
  6. omextra-0.0.0.dev498/omextra/text/abnf/grammars.py +235 -0
  7. omextra-0.0.0.dev498/omextra/text/abnf/matches.py +145 -0
  8. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/text/abnf/meta.py +39 -17
  9. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/text/abnf/ops.py +67 -5
  10. omextra-0.0.0.dev498/omextra/text/abnf/opto.py +257 -0
  11. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/text/abnf/parsing.py +53 -5
  12. omextra-0.0.0.dev498/omextra/text/abnf/utils.py +68 -0
  13. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/text/abnf/visitors.py +1 -1
  14. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498/omextra.egg-info}/PKG-INFO +2 -2
  15. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra.egg-info/SOURCES.txt +2 -0
  16. omextra-0.0.0.dev498/omextra.egg-info/requires.txt +1 -0
  17. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/pyproject.toml +2 -2
  18. omextra-0.0.0.dev497/omextra/text/abnf/__init__.py +0 -94
  19. omextra-0.0.0.dev497/omextra/text/abnf/base.py +0 -317
  20. omextra-0.0.0.dev497/omextra/text/abnf/opto.py +0 -154
  21. omextra-0.0.0.dev497/omextra/text/abnf/utils.py +0 -71
  22. omextra-0.0.0.dev497/omextra.egg-info/requires.txt +0 -1
  23. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/LICENSE +0 -0
  24. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/MANIFEST.in +0 -0
  25. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/README.md +0 -0
  26. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/.omlish-manifests.json +0 -0
  27. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/README.md +0 -0
  28. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/__about__.py +0 -0
  29. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/__init__.py +0 -0
  30. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/asyncs/__init__.py +0 -0
  31. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/asyncs/bluelet/LICENSE +0 -0
  32. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/asyncs/bluelet/__init__.py +0 -0
  33. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/asyncs/bluelet/all.py +0 -0
  34. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/asyncs/bluelet/api.py +0 -0
  35. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/asyncs/bluelet/core.py +0 -0
  36. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/asyncs/bluelet/events.py +0 -0
  37. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/asyncs/bluelet/files.py +0 -0
  38. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/asyncs/bluelet/runner.py +0 -0
  39. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/asyncs/bluelet/sockets.py +0 -0
  40. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/asyncs/bridge.py +0 -0
  41. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/collections/__init__.py +0 -0
  42. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/collections/hamt/LICENSE +0 -0
  43. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/collections/hamt/__init__.py +0 -0
  44. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/collections/hamt/_hamt.c +0 -0
  45. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/defs.py +0 -0
  46. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/dynamic.py +0 -0
  47. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/formats/__init__.py +0 -0
  48. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/formats/goyaml/LICENSE +0 -0
  49. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/formats/goyaml/__init__.py +0 -0
  50. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/formats/goyaml/ast.py +0 -0
  51. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/formats/goyaml/errors.py +0 -0
  52. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/formats/goyaml/parsing.py +0 -0
  53. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/formats/goyaml/scanning.py +0 -0
  54. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/formats/goyaml/tokens.py +0 -0
  55. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/formats/json/Json.g4 +0 -0
  56. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/formats/json/__init__.py +0 -0
  57. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/formats/json/_antlr/JsonLexer.py +0 -0
  58. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/formats/json/_antlr/JsonListener.py +0 -0
  59. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/formats/json/_antlr/JsonParser.py +0 -0
  60. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/formats/json/_antlr/JsonVisitor.py +0 -0
  61. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/formats/json/_antlr/__init__.py +0 -0
  62. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/formats/json5/Json5.g4 +0 -0
  63. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/formats/json5/__init__.py +0 -0
  64. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/formats/json5/_antlr/Json5Lexer.py +0 -0
  65. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/formats/json5/_antlr/Json5Listener.py +0 -0
  66. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/formats/json5/_antlr/Json5Parser.py +0 -0
  67. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/formats/json5/_antlr/Json5Visitor.py +0 -0
  68. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/formats/json5/_antlr/__init__.py +0 -0
  69. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/formats/json5/parsing.py +0 -0
  70. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/io/__init__.py +0 -0
  71. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/io/trampoline.py +0 -0
  72. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/specs/__init__.py +0 -0
  73. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/specs/proto/Protobuf3.g4 +0 -0
  74. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/specs/proto/__init__.py +0 -0
  75. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/specs/proto/_antlr/Protobuf3Lexer.py +0 -0
  76. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/specs/proto/_antlr/Protobuf3Listener.py +0 -0
  77. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/specs/proto/_antlr/Protobuf3Parser.py +0 -0
  78. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/specs/proto/_antlr/Protobuf3Visitor.py +0 -0
  79. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/specs/proto/_antlr/__init__.py +0 -0
  80. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/specs/proto/nodes.py +0 -0
  81. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/specs/proto/parsing.py +0 -0
  82. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/sql/__init__.py +0 -0
  83. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/sql/parsing/Minisql.g4 +0 -0
  84. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/sql/parsing/__init__.py +0 -0
  85. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/sql/parsing/_antlr/MinisqlLexer.py +0 -0
  86. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/sql/parsing/_antlr/MinisqlListener.py +0 -0
  87. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/sql/parsing/_antlr/MinisqlParser.py +0 -0
  88. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/sql/parsing/_antlr/MinisqlVisitor.py +0 -0
  89. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/sql/parsing/_antlr/__init__.py +0 -0
  90. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/sql/parsing/parsing.py +0 -0
  91. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/text/__init__.py +0 -0
  92. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/text/abnf/LICENSE +0 -0
  93. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/text/abnf/docs/__init__.py +0 -0
  94. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/text/abnf/docs/rfc5234.txt +0 -0
  95. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/text/abnf/docs/rfc7405.txt +0 -0
  96. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/text/abnf/errors.py +0 -0
  97. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/text/abnf/internal.py +0 -0
  98. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/text/antlr/__init__.py +0 -0
  99. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/text/antlr/_runtime/BufferedTokenStream.py +0 -0
  100. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/text/antlr/_runtime/CommonTokenFactory.py +0 -0
  101. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/text/antlr/_runtime/CommonTokenStream.py +0 -0
  102. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/text/antlr/_runtime/FileStream.py +0 -0
  103. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/text/antlr/_runtime/InputStream.py +0 -0
  104. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/text/antlr/_runtime/IntervalSet.py +0 -0
  105. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/text/antlr/_runtime/LICENSE.txt +0 -0
  106. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/text/antlr/_runtime/LL1Analyzer.py +0 -0
  107. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/text/antlr/_runtime/Lexer.py +0 -0
  108. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/text/antlr/_runtime/ListTokenSource.py +0 -0
  109. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/text/antlr/_runtime/Parser.py +0 -0
  110. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/text/antlr/_runtime/ParserInterpreter.py +0 -0
  111. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/text/antlr/_runtime/ParserRuleContext.py +0 -0
  112. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/text/antlr/_runtime/PredictionContext.py +0 -0
  113. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/text/antlr/_runtime/Recognizer.py +0 -0
  114. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/text/antlr/_runtime/RuleContext.py +0 -0
  115. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/text/antlr/_runtime/StdinStream.py +0 -0
  116. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/text/antlr/_runtime/Token.py +0 -0
  117. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/text/antlr/_runtime/TokenStreamRewriter.py +0 -0
  118. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/text/antlr/_runtime/Utils.py +0 -0
  119. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/text/antlr/_runtime/__init__.py +0 -0
  120. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/text/antlr/_runtime/_all.py +0 -0
  121. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/text/antlr/_runtime/_pygrun.py +0 -0
  122. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/text/antlr/_runtime/atn/ATN.py +0 -0
  123. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/text/antlr/_runtime/atn/ATNConfig.py +0 -0
  124. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/text/antlr/_runtime/atn/ATNConfigSet.py +0 -0
  125. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/text/antlr/_runtime/atn/ATNDeserializationOptions.py +0 -0
  126. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/text/antlr/_runtime/atn/ATNDeserializer.py +0 -0
  127. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/text/antlr/_runtime/atn/ATNSimulator.py +0 -0
  128. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/text/antlr/_runtime/atn/ATNState.py +0 -0
  129. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/text/antlr/_runtime/atn/ATNType.py +0 -0
  130. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/text/antlr/_runtime/atn/LexerATNSimulator.py +0 -0
  131. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/text/antlr/_runtime/atn/LexerAction.py +0 -0
  132. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/text/antlr/_runtime/atn/LexerActionExecutor.py +0 -0
  133. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/text/antlr/_runtime/atn/ParserATNSimulator.py +0 -0
  134. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/text/antlr/_runtime/atn/PredictionMode.py +0 -0
  135. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/text/antlr/_runtime/atn/SemanticContext.py +0 -0
  136. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/text/antlr/_runtime/atn/Transition.py +0 -0
  137. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/text/antlr/_runtime/atn/__init__.py +0 -0
  138. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/text/antlr/_runtime/dfa/DFA.py +0 -0
  139. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/text/antlr/_runtime/dfa/DFASerializer.py +0 -0
  140. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/text/antlr/_runtime/dfa/DFAState.py +0 -0
  141. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/text/antlr/_runtime/dfa/__init__.py +0 -0
  142. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/text/antlr/_runtime/error/DiagnosticErrorListener.py +0 -0
  143. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/text/antlr/_runtime/error/ErrorListener.py +0 -0
  144. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/text/antlr/_runtime/error/ErrorStrategy.py +0 -0
  145. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/text/antlr/_runtime/error/Errors.py +0 -0
  146. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/text/antlr/_runtime/error/__init__.py +0 -0
  147. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/text/antlr/_runtime/tree/Chunk.py +0 -0
  148. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/text/antlr/_runtime/tree/ParseTreeMatch.py +0 -0
  149. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/text/antlr/_runtime/tree/ParseTreePattern.py +0 -0
  150. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/text/antlr/_runtime/tree/ParseTreePatternMatcher.py +0 -0
  151. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/text/antlr/_runtime/tree/RuleTagToken.py +0 -0
  152. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/text/antlr/_runtime/tree/TokenTagToken.py +0 -0
  153. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/text/antlr/_runtime/tree/Tree.py +0 -0
  154. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/text/antlr/_runtime/tree/Trees.py +0 -0
  155. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/text/antlr/_runtime/tree/__init__.py +0 -0
  156. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/text/antlr/_runtime/xpath/XPath.py +0 -0
  157. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/text/antlr/_runtime/xpath/XPathLexer.py +0 -0
  158. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/text/antlr/_runtime/xpath/__init__.py +0 -0
  159. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/text/antlr/cli/__init__.py +0 -0
  160. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/text/antlr/cli/__main__.py +0 -0
  161. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/text/antlr/cli/cli.py +0 -0
  162. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/text/antlr/cli/consts.py +0 -0
  163. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/text/antlr/cli/gen.py +0 -0
  164. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/text/antlr/delimit.py +0 -0
  165. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/text/antlr/dot.py +0 -0
  166. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/text/antlr/errors.py +0 -0
  167. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/text/antlr/input.py +0 -0
  168. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/text/antlr/parsing.py +0 -0
  169. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/text/antlr/runtime.py +0 -0
  170. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra/text/antlr/utils.py +0 -0
  171. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra.egg-info/dependency_links.txt +0 -0
  172. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra.egg-info/entry_points.txt +0 -0
  173. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/omextra.egg-info/top_level.txt +0 -0
  174. {omextra-0.0.0.dev497 → omextra-0.0.0.dev498}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: omextra
3
- Version: 0.0.0.dev497
3
+ Version: 0.0.0.dev498
4
4
  Summary: omextra
5
5
  Author: wrmsr
6
6
  License-Expression: BSD-3-Clause
@@ -14,7 +14,7 @@ Classifier: Programming Language :: Python :: 3.13
14
14
  Requires-Python: >=3.13
15
15
  Description-Content-Type: text/markdown
16
16
  License-File: LICENSE
17
- Requires-Dist: omlish==0.0.0.dev497
17
+ Requires-Dist: omlish==0.0.0.dev498
18
18
  Dynamic: license-file
19
19
 
20
20
  # Overview
@@ -0,0 +1,125 @@
1
+ """
2
+ Parser generator for ABNF grammars.
3
+
4
+ Originally based on library by Charles Yeomans (see LICENSE file):
5
+
6
+ https://github.com/declaresub/abnf/tree/561ced67c0a8afc869ad0de5b39dbe4f6e71b0d8/src/abnf
7
+
8
+ It has however been entirely rewritten.
9
+
10
+ ====
11
+
12
+ TODO:
13
+ - opto
14
+ - error reporting
15
+ - codegen?
16
+ - | as either(first_match=True)
17
+ - optional auto SPACE channel for ALL-UPCASE-RULE-NAMES
18
+ - fix_ws problem
19
+ - auto? no, need to keep lines / offsets accurate for errors
20
+ - relax CRLF rule by default?
21
+ - grammar transform? helper kwarg?
22
+ - kwarg to mark uppercase rules insignificant
23
+ - ebnf mode?
24
+ - peg / lalr engines?
25
+ - must always keep true abnf mode
26
+ - optionally separate lexing step
27
+
28
+ ====
29
+
30
+ | Feature | EBNF | ABNF |
31
+ | ------------------------- | -------------- | ---------------- |
32
+ | Rule terminator | `;` | none |
33
+ | Alternation | `|` | `/` |
34
+ | Optional | `[a]` or `a?` | `[a]` |
35
+ | Zero or more | `a*` | `*a` |
36
+ | One or more | `a+` | `1*a` |
37
+ | Bounded repetition | `1..5 a` | `1*5a` |
38
+ | Character ranges | sometimes: | `%xNN-NN` |
39
+ | | `"0" .. "9"` | |
40
+ | Literal chars | `'a'` or `"a"` | `"a"` only |
41
+ | Case-insensitive literals | no | `%i"..."` |
42
+ | Comments | `(* *)` or | `;` |
43
+ | | `/* */` or | |
44
+ | | `-- ` | |
45
+ | Rule names | case-sensitive | case-insensitive |
46
+
47
+ """
48
+ from omlish import dataclasses as _dc # noqa
49
+
50
+
51
+ _dc.init_package(
52
+ globals(),
53
+ codegen=True,
54
+ )
55
+
56
+
57
+ ##
58
+
59
+
60
+ from .base import ( # noqa
61
+ Op,
62
+ )
63
+
64
+ from .core import ( # noqa
65
+ CORE_RULES,
66
+ )
67
+
68
+ from .errors import ( # noqa
69
+ AbnfError,
70
+ AbnfGrammarParseError,
71
+ )
72
+
73
+ from .grammars import ( # noqa
74
+ Channel,
75
+ Rule,
76
+ RulesCollection,
77
+
78
+ Grammar,
79
+ )
80
+
81
+ from .matches import ( # noqa
82
+ Match,
83
+
84
+ longest_match,
85
+ filter_matches,
86
+ )
87
+
88
+ from .meta import ( # noqa
89
+ META_GRAMMAR_RULES,
90
+ META_GRAMMAR,
91
+
92
+ parse_grammar,
93
+ )
94
+
95
+ from .ops import ( # noqa
96
+ Literal,
97
+ StringLiteral,
98
+ CaseInsensitiveStringLiteral,
99
+ RangeLiteral,
100
+ literal,
101
+
102
+ Concat,
103
+ concat,
104
+
105
+ Repeat,
106
+ repeat,
107
+ option,
108
+
109
+ Either,
110
+ either,
111
+
112
+ RuleRef,
113
+ rule,
114
+ )
115
+
116
+ from .parsing import ( # noqa
117
+ iter_parse,
118
+ parse,
119
+ )
120
+
121
+ from .utils import ( # noqa
122
+ only_match_rules,
123
+
124
+ fix_ws,
125
+ )
@@ -39,6 +39,8 @@ def _register(**kwargs):
39
39
  cls_names=(
40
40
  ('omextra.text.abnf', 'MetaGrammarRuleMatchVisitor.QuotedString'),
41
41
  ('omextra.text.abnf', 'MetaGrammarRuleMatchVisitor.RuleName'),
42
+ ('omextra.text.abnf', '_CaseInsensitiveStringLiteralRegexItem'),
43
+ ('omextra.text.abnf', '_StringLiteralRegexItem'),
42
44
  ),
43
45
  )
44
46
  def _process_dataclass__30a5dd74853303d917aae5f67d4e7189615d1440():
@@ -436,3 +438,247 @@ def _process_dataclass__3dce49e08774c707abbc7a6513e35ccdc43001c9():
436
438
  setattr(__dataclass__cls, '__init__', __init__)
437
439
 
438
440
  return _process_dataclass
441
+
442
+
443
+ @_register(
444
+ plan_repr=(
445
+ "Plans(tup=(CopyPlan(fields=()), EqPlan(fields=()), FrozenPlan(fields=(), allow_dynamic_dunder_attrs=False), Ha"
446
+ "shPlan(action='add', fields=(), cache=False), InitPlan(fields=(), self_param='self', std_params=(), kw_only_pa"
447
+ "rams=(), frozen=True, slots=False, post_init_params=None, init_fns=(), validate_fns=()), ReprPlan(fields=(), i"
448
+ "d=False, terse=False, default_fn=None)))"
449
+ ),
450
+ plan_repr_sha1='e1f7edfe11f2b721d6a656c46e698fedc95461bb',
451
+ op_ref_idents=(),
452
+ cls_names=(
453
+ ('omextra.text.abnf', '_RegexItem'),
454
+ ),
455
+ )
456
+ def _process_dataclass__e1f7edfe11f2b721d6a656c46e698fedc95461bb():
457
+ def _process_dataclass(
458
+ *,
459
+ __dataclass__cls,
460
+ __dataclass__FieldFnValidationError, # noqa
461
+ __dataclass__FieldTypeValidationError, # noqa
462
+ __dataclass__FnValidationError, # noqa
463
+ __dataclass__FrozenInstanceError=dataclasses.FrozenInstanceError, # noqa
464
+ __dataclass__FunctionType=types.FunctionType, # noqa
465
+ __dataclass__HAS_DEFAULT_FACTORY=dataclasses._HAS_DEFAULT_FACTORY, # noqa
466
+ __dataclass__MISSING=dataclasses.MISSING, # noqa
467
+ __dataclass__None=None, # noqa
468
+ __dataclass__TypeError=TypeError, # noqa
469
+ __dataclass___recursive_repr=reprlib.recursive_repr, # noqa
470
+ __dataclass__isinstance=isinstance, # noqa
471
+ __dataclass__object_setattr=object.__setattr__, # noqa
472
+ __dataclass__property=property, # noqa
473
+ ):
474
+ def __copy__(self):
475
+ if self.__class__ is not __dataclass__cls:
476
+ raise TypeError(self)
477
+ return __dataclass__cls() # noqa
478
+
479
+ __copy__.__qualname__ = f"{__dataclass__cls.__qualname__}.__copy__"
480
+ if '__copy__' in __dataclass__cls.__dict__:
481
+ raise __dataclass__TypeError(f"Cannot overwrite attribute __copy__ in class {__dataclass__cls.__name__}")
482
+ setattr(__dataclass__cls, '__copy__', __copy__)
483
+
484
+ def __eq__(self, other):
485
+ if self is other:
486
+ return True
487
+ if self.__class__ is not other.__class__:
488
+ return NotImplemented
489
+ return True
490
+
491
+ __eq__.__qualname__ = f"{__dataclass__cls.__qualname__}.__eq__"
492
+ if '__eq__' in __dataclass__cls.__dict__:
493
+ raise __dataclass__TypeError(f"Cannot overwrite attribute __eq__ in class {__dataclass__cls.__name__}")
494
+ setattr(__dataclass__cls, '__eq__', __eq__)
495
+
496
+ def __setattr__(self, name, value):
497
+ if (
498
+ type(self) is __dataclass__cls
499
+ ):
500
+ raise __dataclass__FrozenInstanceError(f"cannot assign to field {name!r}")
501
+ super(__dataclass__cls, self).__setattr__(name, value)
502
+
503
+ __setattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__setattr__"
504
+ if '__setattr__' in __dataclass__cls.__dict__:
505
+ raise __dataclass__TypeError(f"Cannot overwrite attribute __setattr__ in class {__dataclass__cls.__name__}")
506
+ setattr(__dataclass__cls, '__setattr__', __setattr__)
507
+
508
+ def __delattr__(self, name):
509
+ if (
510
+ type(self) is __dataclass__cls
511
+ ):
512
+ raise __dataclass__FrozenInstanceError(f"cannot delete field {name!r}")
513
+ super(__dataclass__cls, self).__delattr__(name)
514
+
515
+ __delattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__delattr__"
516
+ if '__delattr__' in __dataclass__cls.__dict__:
517
+ raise __dataclass__TypeError(f"Cannot overwrite attribute __delattr__ in class {__dataclass__cls.__name__}")
518
+ setattr(__dataclass__cls, '__delattr__', __delattr__)
519
+
520
+ def __hash__(self):
521
+ return hash(())
522
+
523
+ __hash__.__qualname__ = f"{__dataclass__cls.__qualname__}.__hash__"
524
+ setattr(__dataclass__cls, '__hash__', __hash__)
525
+
526
+ def __init__(
527
+ self,
528
+ ) -> __dataclass__None:
529
+ pass
530
+
531
+ __init__.__qualname__ = f"{__dataclass__cls.__qualname__}.__init__"
532
+ if '__init__' in __dataclass__cls.__dict__:
533
+ raise __dataclass__TypeError(f"Cannot overwrite attribute __init__ in class {__dataclass__cls.__name__}")
534
+ setattr(__dataclass__cls, '__init__', __init__)
535
+
536
+ @__dataclass___recursive_repr()
537
+ def __repr__(self):
538
+ parts = []
539
+ return (
540
+ f"{self.__class__.__qualname__}("
541
+ f"{', '.join(parts)}"
542
+ f")"
543
+ )
544
+
545
+ __repr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__repr__"
546
+ if '__repr__' in __dataclass__cls.__dict__:
547
+ raise __dataclass__TypeError(f"Cannot overwrite attribute __repr__ in class {__dataclass__cls.__name__}")
548
+ setattr(__dataclass__cls, '__repr__', __repr__)
549
+
550
+ return _process_dataclass
551
+
552
+
553
+ @_register(
554
+ plan_repr=(
555
+ "Plans(tup=(CopyPlan(fields=('ps',)), EqPlan(fields=('ps',)), FrozenPlan(fields=('ps',), allow_dynamic_dunder_a"
556
+ "ttrs=False), HashPlan(action='add', fields=('ps',), cache=False), InitPlan(fields=(InitPlan.Field(name='ps', a"
557
+ "nnotation=OpRef(name='init.fields.0.annotation'), default=None, default_factory=None, init=True, override=Fals"
558
+ "e, field_type=FieldType.INSTANCE, coerce=None, validate=None, check_type=None),), self_param='self', std_param"
559
+ "s=('ps',), kw_only_params=(), frozen=True, slots=False, post_init_params=None, init_fns=(), validate_fns=()), "
560
+ "ReprPlan(fields=(ReprPlan.Field(name='ps', kw_only=False, fn=None),), id=False, terse=False, default_fn=None))"
561
+ ")"
562
+ ),
563
+ plan_repr_sha1='f7dc3147180d5d4dc248e9c0d94aa0f1e503c4c7',
564
+ op_ref_idents=(
565
+ '__dataclass__init__fields__0__annotation',
566
+ ),
567
+ cls_names=(
568
+ ('omextra.text.abnf', '_RegexRegexItem'),
569
+ ),
570
+ )
571
+ def _process_dataclass__f7dc3147180d5d4dc248e9c0d94aa0f1e503c4c7():
572
+ def _process_dataclass(
573
+ *,
574
+ __dataclass__cls,
575
+ __dataclass__init__fields__0__annotation,
576
+ __dataclass__FieldFnValidationError, # noqa
577
+ __dataclass__FieldTypeValidationError, # noqa
578
+ __dataclass__FnValidationError, # noqa
579
+ __dataclass__FrozenInstanceError=dataclasses.FrozenInstanceError, # noqa
580
+ __dataclass__FunctionType=types.FunctionType, # noqa
581
+ __dataclass__HAS_DEFAULT_FACTORY=dataclasses._HAS_DEFAULT_FACTORY, # noqa
582
+ __dataclass__MISSING=dataclasses.MISSING, # noqa
583
+ __dataclass__None=None, # noqa
584
+ __dataclass__TypeError=TypeError, # noqa
585
+ __dataclass___recursive_repr=reprlib.recursive_repr, # noqa
586
+ __dataclass__isinstance=isinstance, # noqa
587
+ __dataclass__object_setattr=object.__setattr__, # noqa
588
+ __dataclass__property=property, # noqa
589
+ ):
590
+ def __copy__(self):
591
+ if self.__class__ is not __dataclass__cls:
592
+ raise TypeError(self)
593
+ return __dataclass__cls( # noqa
594
+ ps=self.ps,
595
+ )
596
+
597
+ __copy__.__qualname__ = f"{__dataclass__cls.__qualname__}.__copy__"
598
+ if '__copy__' in __dataclass__cls.__dict__:
599
+ raise __dataclass__TypeError(f"Cannot overwrite attribute __copy__ in class {__dataclass__cls.__name__}")
600
+ setattr(__dataclass__cls, '__copy__', __copy__)
601
+
602
+ def __eq__(self, other):
603
+ if self is other:
604
+ return True
605
+ if self.__class__ is not other.__class__:
606
+ return NotImplemented
607
+ return (
608
+ self.ps == other.ps
609
+ )
610
+
611
+ __eq__.__qualname__ = f"{__dataclass__cls.__qualname__}.__eq__"
612
+ if '__eq__' in __dataclass__cls.__dict__:
613
+ raise __dataclass__TypeError(f"Cannot overwrite attribute __eq__ in class {__dataclass__cls.__name__}")
614
+ setattr(__dataclass__cls, '__eq__', __eq__)
615
+
616
+ __dataclass___setattr_frozen_fields = {
617
+ 'ps',
618
+ }
619
+
620
+ def __setattr__(self, name, value):
621
+ if (
622
+ type(self) is __dataclass__cls
623
+ or name in __dataclass___setattr_frozen_fields
624
+ ):
625
+ raise __dataclass__FrozenInstanceError(f"cannot assign to field {name!r}")
626
+ super(__dataclass__cls, self).__setattr__(name, value)
627
+
628
+ __setattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__setattr__"
629
+ if '__setattr__' in __dataclass__cls.__dict__:
630
+ raise __dataclass__TypeError(f"Cannot overwrite attribute __setattr__ in class {__dataclass__cls.__name__}")
631
+ setattr(__dataclass__cls, '__setattr__', __setattr__)
632
+
633
+ __dataclass___delattr_frozen_fields = {
634
+ 'ps',
635
+ }
636
+
637
+ def __delattr__(self, name):
638
+ if (
639
+ type(self) is __dataclass__cls
640
+ or name in __dataclass___delattr_frozen_fields
641
+ ):
642
+ raise __dataclass__FrozenInstanceError(f"cannot delete field {name!r}")
643
+ super(__dataclass__cls, self).__delattr__(name)
644
+
645
+ __delattr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__delattr__"
646
+ if '__delattr__' in __dataclass__cls.__dict__:
647
+ raise __dataclass__TypeError(f"Cannot overwrite attribute __delattr__ in class {__dataclass__cls.__name__}")
648
+ setattr(__dataclass__cls, '__delattr__', __delattr__)
649
+
650
+ def __hash__(self):
651
+ return hash((
652
+ self.ps,
653
+ ))
654
+
655
+ __hash__.__qualname__ = f"{__dataclass__cls.__qualname__}.__hash__"
656
+ setattr(__dataclass__cls, '__hash__', __hash__)
657
+
658
+ def __init__(
659
+ self,
660
+ ps: __dataclass__init__fields__0__annotation,
661
+ ) -> __dataclass__None:
662
+ __dataclass__object_setattr(self, 'ps', ps)
663
+
664
+ __init__.__qualname__ = f"{__dataclass__cls.__qualname__}.__init__"
665
+ if '__init__' in __dataclass__cls.__dict__:
666
+ raise __dataclass__TypeError(f"Cannot overwrite attribute __init__ in class {__dataclass__cls.__name__}")
667
+ setattr(__dataclass__cls, '__init__', __init__)
668
+
669
+ @__dataclass___recursive_repr()
670
+ def __repr__(self):
671
+ parts = []
672
+ parts.append(f"ps={self.ps!r}")
673
+ return (
674
+ f"{self.__class__.__qualname__}("
675
+ f"{', '.join(parts)}"
676
+ f")"
677
+ )
678
+
679
+ __repr__.__qualname__ = f"{__dataclass__cls.__qualname__}.__repr__"
680
+ if '__repr__' in __dataclass__cls.__dict__:
681
+ raise __dataclass__TypeError(f"Cannot overwrite attribute __repr__ in class {__dataclass__cls.__name__}")
682
+ setattr(__dataclass__cls, '__repr__', __repr__)
683
+
684
+ return _process_dataclass
@@ -0,0 +1,44 @@
1
+ import abc
2
+ import typing as ta
3
+
4
+ from omlish import check
5
+ from omlish import lang
6
+
7
+
8
+ OpTuple: ta.TypeAlias = tuple['Op', ...]
9
+
10
+
11
+ ##
12
+
13
+
14
+ class Op(lang.Abstract, lang.PackageSealed):
15
+ def _match_repr(self) -> str:
16
+ return f'{self.__class__.__name__}@{id(self):x}'
17
+
18
+
19
+ class CompositeOp(Op, lang.Abstract):
20
+ def __init_subclass__(cls, **kwargs: ta.Any) -> None:
21
+ super().__init_subclass__(**kwargs)
22
+
23
+ try:
24
+ leaf_op_cls = LeafOp
25
+ except NameError:
26
+ pass
27
+ else:
28
+ check.not_issubclass(cls, leaf_op_cls)
29
+
30
+ @property
31
+ @abc.abstractmethod
32
+ def children(self) -> OpTuple:
33
+ raise NotImplementedError
34
+
35
+ @abc.abstractmethod
36
+ def replace_children(self, *children: Op) -> Op:
37
+ raise NotImplementedError
38
+
39
+
40
+ class LeafOp(Op, lang.Abstract):
41
+ def __init_subclass__(cls, **kwargs: ta.Any) -> None:
42
+ super().__init_subclass__(**kwargs)
43
+
44
+ check.not_issubclass(cls, CompositeOp)
@@ -3,13 +3,15 @@ https://datatracker.ietf.org/doc/html/rfc5234
3
3
  """
4
4
  import typing as ta
5
5
 
6
- from .base import Grammar
7
- from .base import Rule
6
+ from .grammars import Channel
7
+ from .grammars import Grammar
8
+ from .grammars import Rule
8
9
  from .ops import concat
9
10
  from .ops import either
10
11
  from .ops import literal
11
12
  from .ops import repeat
12
13
  from .ops import rule
14
+ from .opto import optimize_grammar
13
15
 
14
16
 
15
17
  ##
@@ -23,6 +25,7 @@ CORE_RULES: ta.Sequence[Rule] = [
23
25
  literal('\x41', '\x5a'),
24
26
  literal('\x61', '\x7a'),
25
27
  ),
28
+ channel=Channel.CONTENT,
26
29
  ),
27
30
 
28
31
  Rule(
@@ -31,11 +34,13 @@ CORE_RULES: ta.Sequence[Rule] = [
31
34
  literal('0'),
32
35
  literal('1'),
33
36
  ),
37
+ channel=Channel.CONTENT,
34
38
  ),
35
39
 
36
40
  Rule(
37
41
  'CHAR',
38
42
  literal('\x01', '\x7f'),
43
+ channel=Channel.CONTENT,
39
44
  ),
40
45
 
41
46
  Rule(
@@ -44,12 +49,13 @@ CORE_RULES: ta.Sequence[Rule] = [
44
49
  literal('\x00', '\x1f'),
45
50
  literal('\x7f', case_sensitive=True),
46
51
  ),
52
+ channel=Channel.CONTENT,
47
53
  ),
48
54
 
49
55
  Rule(
50
56
  'CR',
51
57
  literal('\x0d', case_sensitive=True),
52
- insignificant=True,
58
+ channel=Channel.SPACE,
53
59
  ),
54
60
 
55
61
  Rule(
@@ -58,17 +64,19 @@ CORE_RULES: ta.Sequence[Rule] = [
58
64
  rule('CR'),
59
65
  rule('LF'),
60
66
  ),
61
- insignificant=True,
67
+ channel=Channel.SPACE,
62
68
  ),
63
69
 
64
70
  Rule(
65
71
  'DIGIT',
66
72
  literal('\x30', '\x39'),
73
+ channel=Channel.CONTENT,
67
74
  ),
68
75
 
69
76
  Rule(
70
77
  'DQUOTE',
71
78
  literal('\x22', case_sensitive=True),
79
+ channel=Channel.CONTENT,
72
80
  ),
73
81
 
74
82
  Rule(
@@ -82,18 +90,19 @@ CORE_RULES: ta.Sequence[Rule] = [
82
90
  literal('E'),
83
91
  literal('F'),
84
92
  ),
93
+ channel=Channel.CONTENT,
85
94
  ),
86
95
 
87
96
  Rule(
88
97
  'HTAB',
89
98
  literal('\x09', case_sensitive=True),
90
- insignificant=True,
99
+ channel=Channel.SPACE,
91
100
  ),
92
101
 
93
102
  Rule(
94
103
  'LF',
95
104
  literal('\x0a', case_sensitive=True),
96
- insignificant=True,
105
+ channel=Channel.SPACE,
97
106
  ),
98
107
 
99
108
  Rule(
@@ -107,23 +116,25 @@ CORE_RULES: ta.Sequence[Rule] = [
107
116
  ),
108
117
  ),
109
118
  ),
110
- insignificant=True,
119
+ channel=Channel.SPACE,
111
120
  ),
112
121
 
113
122
  Rule(
114
123
  'OCTET',
115
124
  literal('\x00', '\xff'),
125
+ channel=Channel.CONTENT,
116
126
  ),
117
127
 
118
128
  Rule(
119
129
  'SP',
120
130
  literal('\x20', case_sensitive=True),
121
- insignificant=True,
131
+ channel=Channel.SPACE,
122
132
  ),
123
133
 
124
134
  Rule(
125
135
  'VCHAR',
126
136
  literal('\x21', '\x7e'),
137
+ channel=Channel.CONTENT,
127
138
  ),
128
139
 
129
140
  Rule(
@@ -132,10 +143,11 @@ CORE_RULES: ta.Sequence[Rule] = [
132
143
  rule('SP'),
133
144
  rule('HTAB'),
134
145
  ),
135
- insignificant=True,
146
+ channel=Channel.SPACE,
136
147
  ),
137
148
 
138
149
  ]
139
150
 
140
151
 
141
- CORE_GRAMMAR = Grammar(*CORE_RULES)
152
+ RAW_CORE_GRAMMAR = Grammar(*CORE_RULES)
153
+ CORE_GRAMMAR = optimize_grammar(RAW_CORE_GRAMMAR)