Replies: 3 comments 4 replies
-
how to split lexer rules? |
Beta Was this translation helpful? Give feedback.
-
Input string
Input string
FRAGMENTPUTI is defined as
So, why is It is because the lexer matches the LONGEST string first regardless of the order of the lexer rules.
|
Beta Was this translation helpful? Give feedback.
-
FOR EXAMPLE I USE RULE (' ' | '\t')* AS PREDICTION FOR SPACES IN virajeniya https://i.imgur.com/8iTYQiE.png But its expecting some line 1:14 extraneous input ' ' expecting {'+', '-', '(', A_ДЕСЯТЕРИЧНЫЙ_НОМЕР, A_ДЕСЯТЕРИЧНОЕ_ЧИСЛО, W_БИНАРНОЕ_ЧИСЛО, W_ТРИТИЧНОЕ_ЧИСЛО, W_ЧЕТВЕРИЧНОЕ_ЧИСЛО, W_ПЯТЕРИЧНОЕ_ЧИСЛО, W_ШЕСТЕРИЧНОЕ_ЧИСЛО, W_СЕМИРИЧНОЕ_ЧИСЛО, W_ВОСМЕРИЧНОЕ_ЧИСЛО, W_ДЕВЯТИРИЧНОЕ_ЧИСЛО, W_ШЕСТНАДЦАТИРИЧНОЕ_ЧИСЛО, '.', PROBELNIYODIN, UTF8CHARSET, KVANTIFIKATOR_IDENTIFIKATORA_POLN} another rules that not linked with parser schema. |
Beta Was this translation helpful? Give feedback.
-
https://www.youtube.com/watch?v=Lq-gkbLfOyo
Why lexer can't match start two symbol which one is optional (optional symbol) and it's last.
Beta Was this translation helpful? Give feedback.
All reactions