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
The following test problem shows a missing reduce on $ (EOF) for state 0. Grammar: S -> a S -> epsilon I'll create a pull request with fix.
import util.*; import lr0.*; import lr1.*; public class TestLR { public static void main(String[] args) { String g = "S -> a\n" + "S -> epsilon\n"; LR0Parser lr0Parser = new LR0Parser(new Grammar(g)); if (lr0Parser.parserSLR1()) { System.out.println(lr0Parser.actionTableStr()); System.out.println(lr0Parser.goToTableStr()); } else { System.out.println("parse not ok"); } } }
$ java TestLR Rules: 0 : S' -> S 1 : S -> a 2 : S -> epsilon Action Table : a $ -------------------------------- |0 | SHIFT 2| | -------------------------------- |1 | | REDUCE 2| -------------------------------- |2 | | REDUCE 1| -------------------------------- |3 | | ACCEPT | --------------------------------
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The following test problem shows a missing reduce on $ (EOF) for state 0.
Grammar:
S -> a
S -> epsilon
I'll create a pull request with fix.
The text was updated successfully, but these errors were encountered: