You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For this simple example, the neq rule will never match because lt will always match first and so the rule comparison will succeed and > will not be matched. We could find a way to statically analyse such situation and report the error to the user.
comparison = le / lt / ge / gt / eq / neq
lt = "<" spacing
le = "<=" spacing
gt = ">" spacing
ge = ">=" spacing
eq = "==" spacing
neq = "<>" spacing
The text was updated successfully, but these errors were encountered:
Such an analysis can draw some inspiration in the FIRST/FOLLOW analysis of LL(1) grammar. An optimization could be to detect such LL(1) cases and to optimize the code accordingly (using match instead of nested if, and avoiding backtracking in this case: it would also improve the error reporting since we do not the try the other (not relevant) alternatives).
For this simple example, the
neq
rule will never match becauselt
will always match first and so the rulecomparison
will succeed and>
will not be matched. We could find a way to statically analyse such situation and report the error to the user.The text was updated successfully, but these errors were encountered: