lrama icon indicating copy to clipboard operation
lrama copied to clipboard

Pure Ruby LALR parser generator

Results 38 lrama issues
Sort by recently updated
recently updated
newest added

``` ❯ bison -h Usage: bison [OPTION]... FILE Generate a deterministic LR or generalized LR (GLR) parser employing : (snip) Tuning the Parser: -L, --language=LANGUAGE specify the output programming language...

https://github.com/php/php-src/blob/1684c52a88d1429cf19d4927fe2edf7ff37c66be/Zend/zend_language_parser.y#L1363C1-L1365 ```yacc backup_fn_flags: %prec PREC_ARROW_FUNCTION %empty { $$ = CG(extra_fn_flags); CG(extra_fn_flags) = 0; } ; ```

Fixes: https://github.com/ruby/lrama/issues/568

https://github.com/Perl/perl5/blob/2adc4025ac962d6debca427c98bde824bc4dc4d7/perly.y#L135C1-L135C53 ```yacc %left OROR DORDOR PLUGIN_LOGICAL_OR_OP %left ANDAND PLUGIN_LOGICAL_AND_OP ```

```diff diff --git a/lib/lrama/grammar/stdlib.y b/lib/lrama/grammar/stdlib.y index fc20e0a0d0..b6196d91c3 100644 --- a/lib/lrama/grammar/stdlib.y +++ b/lib/lrama/grammar/stdlib.y @@ -116,7 +116,3 @@ */ %rule separated_list(separator, X): option(separated_nonempty_list(separator, X)) ; - -%% - -%union{}; ```

Support following: ``` %rule %inline op : '+' | '-' ; %% operation : op? ; ```

https://www.gnu.org/software/bison/manual/html_node/Start-Decl.html

I considered introducing **Token Categories** into Lrama, inspired by Chevrotain's Token Categories. This mechanism allows multiple token types to be logically grouped together so they can be matched collectively in...