CarterFendley / fast-dep

MIT License
1 stars 1 forks source link

Move away from Scannerless Parsing #1

Open CarterFendley opened 9 months ago

CarterFendley commented 9 months ago

Currently, we only use a [PEG Pest] grammar in grammar.pest without any lexing / tokenization step to parse files.

For a number of reasons, it would be a good idea to introduce a lexing step.

  1. Especially for a grammar which only parses import statements, the grammar is already complex.
  2. There is some evidence that a lexer-parser pipeline can be more efficient thank doing lexical analysis in the parser (given that grammar parsing algorithms are overkill for tokenization)