even if RightAngleBrace priority is higher than RightMove, i still got a RightMove #4046
ReverseJay
started this conversation in
General
Replies: 1 comment
-
now i guess it's because lexer run before parser, and lexer could only use one strategy, either fit the longest one, or shortest one, so it seems impossible to recognize correctly unless parser could effect lexer |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
in my lexer grammar, i put a lot of operators and arrange them in a particular priority, like below
in my parser, i put a expr parser to recognize expression, like below
i manually assign LAngleBrace/RAngleBrace or Smaller/Bigger, so that it won't be confused
but when i run with
TypeA<TypeB<TypeC>> Var
i still got a
TypeC '>>' Var
, even if lexer grammar has a higher priority, or parser grammar(expr LAngleBrace expr? RAngleBrace
) has a higher priorityi asked this question once, but i think last time i didn't figure out how it happens, now i am here again
Beta Was this translation helpful? Give feedback.
All reactions