I’m still pretty new to PEG.js, and I’m guessing this is just a beginner misunderstanding. In trying to parse something like this: I can get a grammar to properly read the three section (to be further parsed later, of course.) But it generates that text in an odd format. For instance, in the above, “some text” turns into I can
Tag: peg
Who is faster: PEG or GLR?
I’m trying to create some kind of lint tool for the C/AL programming language. So basically I need to perform syntax and lexical analysis against the source code. I’ve planned to write parser from the scratch, but then discovered that there are a lots of tools helping generate these parsers automatically. I need performance, since checking 20 megabytes of code
Parse indentation level with PEG.js
I have essentially the same question as PEG for Python style indentation, but I’d like to get a little more direction regarding this answer. The answer successfully generates an array of strings that are each line of input with ‘INDENT’ and ‘DEDENT’ between lines. It seems like he’s pretty much used PEG.js to tokenize, but no real parsing is happening.