Closed wrandelshofer closed 4 years ago
Hi Luke,
I think, in the parsing code example in the readme file there are same wrong variable names. I have made them fat below:
String grammarSpecFilename = "arithmetic.grammar"; String inputFilename = "arithmetic.input"; String topRuleName = "Program"; String[] recoveryRuleNames = { topRuleName, "Statement" };
String grammarSpec = Files.readString(Paths.get(grammarSpecFilename));
Grammar grammar = MetaGrammar.parse( grammarSpecInput );
String input = Files.readString(Paths.get(inputFilename));
MemoTable memoTable = metaGrammar .parse( srcStr );
ParserInfo.printParseResult(topRuleName, metaGrammar , memoTable, input, recoveryRuleNames, false);
Oops, I should have tested that the code compiles! Fixed, thanks.
Thank you for the fix!
Hi Luke,
I think, in the parsing code example in the readme file there are same wrong variable names. I have made them fat below:
String grammarSpecFilename = "arithmetic.grammar"; String inputFilename = "arithmetic.input"; String topRuleName = "Program"; String[] recoveryRuleNames = { topRuleName, "Statement" };
String grammarSpec = Files.readString(Paths.get(grammarSpecFilename));
Grammar grammar = MetaGrammar.parse( grammarSpecInput );
String input = Files.readString(Paths.get(inputFilename));
MemoTable memoTable = metaGrammar .parse( srcStr );
ParserInfo.printParseResult(topRuleName, metaGrammar , memoTable, input, recoveryRuleNames, false);