We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LR1 items:
parsegen/src/lr1.rs
Lines 10 to 17 in f368fac
LR1 sets:
Lines 80 to 84 in f368fac
This representation generates a lot of redundant (duplicate) info in states:
1571: { [LetExpr -> "let" "(" Binder CommaBinder1_Rev ")" "=" SeqExpr "in" SeqExpr|, "("] [LetExpr -> "let" "(" Binder CommaBinder1_Rev ")" "=" SeqExpr "in" SeqExpr|, "bool"] [LetExpr -> "let" "(" Binder CommaBinder1_Rev ")" "=" SeqExpr "in" SeqExpr|, "-"] [LetExpr -> "let" "(" Binder CommaBinder1_Rev ")" "=" SeqExpr "in" SeqExpr|, "-."] [LetExpr -> "let" "(" Binder CommaBinder1_Rev ")" "=" SeqExpr "in" SeqExpr|, "+"] [LetExpr -> "let" "(" Binder CommaBinder1_Rev ")" "=" SeqExpr "in" SeqExpr|, "+."] [LetExpr -> "let" "(" Binder CommaBinder1_Rev ")" "=" SeqExpr "in" SeqExpr|, "*."] [LetExpr -> "let" "(" Binder CommaBinder1_Rev ")" "=" SeqExpr "in" SeqExpr|, "/."] [LetExpr -> "let" "(" Binder CommaBinder1_Rev ")" "=" SeqExpr "in" SeqExpr|, "="] [LetExpr -> "let" "(" Binder CommaBinder1_Rev ")" "=" SeqExpr "in" SeqExpr|, "<>"] [LetExpr -> "let" "(" Binder CommaBinder1_Rev ")" "=" SeqExpr "in" SeqExpr|, "<="] [LetExpr -> "let" "(" Binder CommaBinder1_Rev ")" "=" SeqExpr "in" SeqExpr|, "<"] [LetExpr -> "let" "(" Binder CommaBinder1_Rev ")" "=" SeqExpr "in" SeqExpr|, ">="] [LetExpr -> "let" "(" Binder CommaBinder1_Rev ")" "=" SeqExpr "in" SeqExpr|, ">"] [LetExpr -> "let" "(" Binder CommaBinder1_Rev ")" "=" SeqExpr "in" SeqExpr|, ","] [LetExpr -> "let" "(" Binder CommaBinder1_Rev ")" "=" SeqExpr "in" SeqExpr|, ";"] [LetExpr -> "let" "(" Binder CommaBinder1_Rev ")" "=" SeqExpr "in" SeqExpr|, "id"] [LetExpr -> "let" "(" Binder CommaBinder1_Rev ")" "=" SeqExpr "in" SeqExpr|, "int"] [LetExpr -> "let" "(" Binder CommaBinder1_Rev ")" "=" SeqExpr "in" SeqExpr|, "float"] }
All of the items in this state have the same production. We can combine all of these items into a single one with a lookahead set:
struct LR1Item { non_terminal_idx: NonTerminalIdx, production_idx: ProductionIdx, cursor: usize, lookahead: FxHashSet<TerminalIdx>, }
We can either add one more field for whether EOF is a valid lookahead, or we can assign EOF a TerminalIdx.
TerminalIdx
See #1 for optimizing terminal sets. (FxHashSet<TerminalIdx> in the code above)
FxHashSet<TerminalIdx>
The text was updated successfully, but these errors were encountered:
No branches or pull requests
LR1 items:
parsegen/src/lr1.rs
Lines 10 to 17 in f368fac
LR1 sets:
parsegen/src/lr1.rs
Lines 80 to 84 in f368fac
This representation generates a lot of redundant (duplicate) info in states:
All of the items in this state have the same production. We can combine all of these items into a single one with a lookahead set:
We can either add one more field for whether EOF is a valid lookahead, or we can assign EOF a
TerminalIdx
.See #1 for optimizing terminal sets. (
FxHashSet<TerminalIdx>
in the code above)The text was updated successfully, but these errors were encountered: