4 ms·
Is that a parser? That looks like a matcher. I actually built something that looks almost exactly like this, but it doesn't get you an AST, right? What am I mis
by weberc2 8y ago
Is that a parser? That looks like a matcher. I actually built something that looks almost exactly like this, but it doesn't get you an AST, right? What am I missing?
- laumars 8y agoIs the code online? What was the output of your routine?
- zzzcpan 8y agoTo get to AST you have to create AST nodes. Make a function that captures the output and put it into places where you want to create AST nodes. Sort of like this: SEQ( ... CAPTURE( // parser to capture SEQ(...), // extra arguments: // a name, a function to call, // that creates an AST node, etc. ), )