Comments (3)
Honest answer: I don't remember. I think "no" but I know I looked at this at some point, and I don't remember what I settled upon.
That said, in general I'd say that in LR parsing it's better to bubble results up then force mutation downwards. Flattening things (as in your example) is a common idiom https://softdevteam.github.io/grmtools/latest_release/book/parsing_idioms.html#define-a-flatten-function -- would that work?
from grmtools.
Yes, I think that would probably work. It has the minor flaw of allocating lots of individual vectors which are then concatenated, but I have no actual reason to think that it would pose a performance problem in practice.
from grmtools.
Informally, my experience is that unless you have very large inputs (or a very very large grammar), parsing performance tends to be a minor concern on modern machines. If however you do encounter problems, please shout!
from grmtools.
Related Issues (20)
- Request for example of handling string literals in lexer HOT 2
- error when using fake UMINUS token in %prec directive HOT 9
- GDB Support? HOT 5
- Add support for comments in lrlex files HOT 3
- Explain why Copy is required for a type specified %parse-param HOT 7
- Nondeterministic generation of Rust code HOT 2
- Support lex-style definitions HOT 1
- Trying to replicate `tinylang.yy` and `tinylang.l` syntax with `nimbleparse` HOT 5
- Weird that `nimbleparse` works on `java7.y` `java7.l` even though the `GT` symbol in both is different. HOT 1
- Online Yacc/Lex editor/tester HOT 6
- Detailed debug info for reduce/reduce shift/reduce errors? HOT 27
- Docs Question - Optional Prefix to Regular Expressions HOT 5
- lrpar lose info about debug HOT 7
- nimbleparse:Suggestions for outputting information HOT 5
- lrlex: match beginning of line HOT 4
- lrpar:%prec not followed by token name HOT 11
- lpar:Unused rule HOT 6
- Is there a way to pass Conext in `$lexer` when doing action? HOT 3
- How to use the code generated by grmtools as a lib for others to use HOT 6
- Make generated parsers usable on the web HOT 1
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 grmtools.