lrama
lrama copied to clipboard
Pure Ruby LALR parser generator
I was hoping to use lrama to generate a parser for a personal project and did a dive into the licensing since `LEGAL.md` mentioned that there are some GPL'd files...
The TODO added in the following PR will be eliminated: - https://github.com/ruby/lrama/pull/143
We came to this decision after discussion at RubyKaigi 2024. Definitions are also possible in the following positions: ``` %rule defined_option(X): /* empty */ | X ; %% program :...
This PR add support for Named Reference in parameterizing rules callers. ## Motivation In some cases I wanted to use alias when we defined compstmt as parameterizing rules: https://github.com/ruby/ruby/blob/96710a3139fecda4bc12cd4f321399f71887535c/parse.y#L3263-L3275 ```...
This PR support for aliased Named References for actions of rhs in Parameterizing rules. ## Motivation If there is a non-terminal symbol in the RHS of parameterizing rules as shown...
I would like to propose a new grammar in this PR. I believe that more parameterizing rules can handle more abstract rules if we can switch between rules and actions...
Support the generation of the IELR(1) parser described in this paper. https://www.sciencedirect.com/science/article/pii/S0167642309001191 This PR will be ready for merging when the following is done. - [x] Add tests - Currently,...
A tiny optimisation that reduces the memory usage by eliminating an array that it not used later anyway. For parsing `spec/fixtures/context/basic.y` it reduces one object: Before: ``` Calculating ------------------------------------- master...