Repository navigation
Current Problems / Tasks #1
Copy link
Copy link
Open
Description
TODOs
- ability to import a parser into the REPL, just can't construct anything in the repl
- so
class A(Rule): ...or A = B|C|D, or any other expression over a Rule should raise an exception, but importing and using should be fine
- so
- add support for building grammars across multiple files
- error messages using the prettyerr library
- consider user defined error hooks into parsing process. TBD exactly what interface would work
- improve the README. have 1 good example, mention grammars must be defined in files, better explanation of GLL backend, etc.
- make it so optional elements are None, not empty array. e.g. missing exponent or missing fractional part of json
- [-]
pull json imports out of test json imports and put in test hydration - mixins
- probably better to just support user defined
def convert(self) -> Whatever: ...
- probably better to just support user defined
- add more grammar examples + corresponding tests
- test CSV grammar
- improve the CSV grammar
- add support for longest match disambiguation rule
- make disambiguation rules filter during parsing rather than after parsing so that the algorithm is more efficient on ambiguous grammars
- support whitespace policy
- default
Explicit SkipUnexpectedWhitespace- blacklist or whitelist to specify which characters are skipable
- basically before trying to eat the next part of a rule, skip all whitespace (assuming rule doesn't contain whitespace)
- this could also be useful for e.g. phone numbers where various delimiters are unimportant (parenthesis, dash, space, etc.)
- default
- ability to skip junk before and or after a parse. in principle we could have a single meta rule that you parameterize with your rule? we would need a new disambiguation which is essentially eat until next rule could start. Alternatively a dumb approach would be to try to eat, progressing one token at a time when failing, until we find the spot we can start from
- filter for rejecting parses. e.g. say we want to parse a number 0-255, should be able to easily say if > 255 fail this branch
- helper for wrapping and optional wrapping. E.g.
wrap[A, ['(',')'], None]->(A)|A. Experiment to find best ergonomics
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Activity