-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Imply precedence & associativity to LALR generator
This feature was ignored in the past to make the parser generator as universal as possible. In this case, I think its better to support this feature, althought it wouldn't be applicable in other parsing algorithms. A pbnf example which already works is: %skip /[\s]+/ ; Int : /[0-9]+/ = int; << '+' '-'; << '*' '/'; factor : Int | '(' expr ')' ; expr$ : expr '*' expr = mul | expr '/' expr = div | expr '+' expr = add | expr '-' expr = sub | factor ;
- Loading branch information
Showing
5 changed files
with
347 additions
and
124 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.