Re: Parsing a language with optional spaces
Akim Demaille <[email protected]>
| Newsgroups | gmane.comp.parsers.bison.general |
|---|---|
| Message-ID | <[email protected]> |
Hi Daniele, > Le 9 juil. 2020 à 00:25, Daniele Nicolodi <[email protected]> a écrit : > >> But the profits would be stunning: you could write parsers in a very straight- >> forward way, even for very complex languages. And on the other side it would >> eventually allow to design languages in a much more user friendly and flexible >> way as well, as it would be straight-forward e.g. to restrict keywords (or >> other patterns) to certain grammar contexts only. > > I may be missing something, but isn't this what a PEG parser does? Yes, that's what parsers with branching can do, be it based on LL, or using parser combinators, or, in the case of LR: GLR, or even stack-based in the case of btyacc (backtracking yacc). Cheers!