Comments (2)
Woah. Let me check it out.
from lalrpop.
Ah, I think this is a duplicate of #32. The problem has to do with this:
Prec2 = {
r".*" => { <>.to_string() }
};
I need to figure out what is going on here, but this is surely not going to work for you in any case. The problem is that LALRPOP operates on a two-stage tokenize-and-then-parse model, and here you have specified a token of "._". This will surely conflict with all the other tokens (e.g., r"[-+]?[0-9]_.?[0-9]+"
). In other words, the way that LR(1) parsers work, the generated code must first (unambiguously) decide which regular expression the text belongs to, without consider where we are in the grammar. (It might be interesting, though, to add a PEG mode, which would accept things like this, or perhaps some other similar hybrid.)
from lalrpop.
Related Issues (20)
- Error in 0.20's generated code HOT 3
- Custom lexer needs context information from the parser? HOT 7
- Custom lexer with custom Token type HOT 8
- Dangling symlinks anywhere in the crate cause obscure build failures HOT 1
- Is it supposed to be possible to use the lexer generator without enabling the unicode feature? HOT 7
- Assertion instead of error message HOT 3
- Additional bracket make generated code fail to compile. HOT 1
- Online yacc/lex grammar editor/tester HOT 2
- Custom parser errors HOT 10
- Grouping rules together HOT 1
- Confusion about Ambiguous regex HOT 1
- Parsing from standard input? HOT 2
- Release 0.20.1 not SemVer compatible? HOT 7
- How can I parse newline-separated code with lalrpop? HOT 2
- Lane Table not quite correct? HOT 2
- Access to span in fallible actions HOT 1
- Replace term with anstream? HOT 3
- Matching order of external tokens is not preserved during generation HOT 2
- Tokens that are not enums
- fail to enable lalr parser HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lalrpop.