Analysis methods for changing the execution language

Looking at Rakudo Perl6 I wonder if there are methods for analysis and lexical analysis that allow you to change / expand the syntax of the language and are effective, and not difficult to implement.

+3
source share
2 answers

"No". [edit: since the question] If the question is about lexing / parsing Perl, its quite complicated. We (see My biography for "we") have a Perl5 lexer. We have really good tools for working with lexer generators (Unicode, multi-state, regexps complete with the built-in "not regexp"). Perl lexer was a royal build headache; we ended up with something like 50 lexical modes (each with its own set of token definitions) for processing the lexical part.

-, , , . , , , () , . , GLR, . .

+1

Source: https://habr.com/ru/post/1777399/


All Articles