paulzfm / ll1pg Goto Github PK
View Code? Open in Web Editor NEWYet another LL(1) parser generation tool, built in principle.
Yet another LL(1) parser generation tool, built in principle.
If there is a rule using undefined character terminated token. It will report confusing error:
Test : '^' { // An confusing error will report for '^' // for '^' is not a defined token } ;
For the above code, if i haven't defined %token '^', it will report
Error at (The position of quotation token): string matching regex [_A-Za-z][_A-za-z0-9]*
expected but `'' found
it's somehow confusing and maybe an undefined token is better if the right side is an undefined terminate character token.
Before write this line, should we check if ts
is empty? If it is empty, the production is unused, and should we warn about it?
Currently, in some situation, this program may generate a Table.java
like this:
// ...
switch (lookahead) {
case PRINT:
case CASE:
case COMPLEX:
case VOID:
case FOR:
case '!':
case '-':
case CLASS:
case READ_LINE:
case WHILE:
case RETURN:
case NULL:
case INT:
case PRINT_COMP:
case SCOPY:
case '}':
case '@':
case DO:
case IDENTIFIER:
case NEW:
case '$':
case IF:
case THIS:
case INSTANCEOF:
case STRING:
case LITERAL:
case BRANCH:
case ELSE:
case '(':
case ';':
case '#':
case OD:
case DCOPY:
case BOOL:
case SUPER:
case BREAK:
case READ_INTEGER:
case '{':
return new Pair<>(131, Arrays.asList()); // <---
return new Pair<>(43, Arrays.asList(ELSE, Stmt)); // <---
default: return null;
}
// ...
This two lines make Java compiler unhappy.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.