Skip to content
Advertisement

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.

Advertisement