petitparser2
petitparser2 copied to clipboard
A high-performance top-down parser
This is possibly related with https://github.com/kursjan/petitparser2/issues/55 I want to parse a big CSV file line by line, and I hoped it was something like: ```smalltalk aCSVStream := 'myFile.csv' asFileReference readStream....
I'd love to adopt petitparser2 for a few projects, but really need support for parsing YAML. Any prospects of adding this feature in the near future?
I basically have a parser ready to parse text input. However another representation of the source is binary - although with the exact same AST structure. It seems that adding...
`'ISLAND' asPParser caseInsensitive sea parse: 'SEA island SEA'` Gives: `Error: should provide specific implementation` Call chain: ``` PP2NextSetsVisitor(Object)>>error: PP2NextSetsVisitor>>visitPP2Node: PP2NextSetsVisitor(PP2NodeVisitor)>>visitPredicateSequence: PP2PredicateSequenceNode>>accept: PP2NextSetsVisitor(PP2NoopVisitor)>>visit: [ :child | self visit: child ] in...
I had suggested this API addition to the original PP after repeatedly needing it: ```smalltalk PPParser>>skipUntil ^ self negate plus, self ==> [ :nodes | nodes second ]. ``` To...
Matches input against a predicate block, like PP2PredicateSequenceNode, but for an unknown/variable length. For example, whereas for fixed-length matches you can already do: parser := PP2PredicateSequenceNode on: [ :value |...
I submit this pull request to suggest a test method `PP2NoopVisitorTest >> testCurrentContext`. We noticed that the method #currentContext is never executed by any of the tests in PP2NoopVisitorTest. Note...
The guide for migration from `PetitParser` says "I am not aware of any use-case for dependencies, so I didn’t migrated the functionality." I think I have just hit such a...
I have a parser with non-trivial actions (`==>`) on several nodes, and I wonder how I can debug problems in the action code, given that `==>` absorbs all exceptions, even...
In PetitParser 1, a tool named "PetitPreprocessor" was added. The goal is to be able to preprocess the input to remove things such as comments in order to make the...