Comments (3)
It should work to do this:
optionalSemicolon: () {
=> (),
Semicolon => (),
}
...
manyStatements: ... {
=> ...
manyStatements[sts] statement[st] optionalSemicolon => ...
}
Here's an example for demo.rs
: https://gist.github.com/goffrie/2dacbe5aefe7e4ea83d4b4da876ef39e
If you're asking for a convenient shorthand (like Semicolon?
instead of adding a new nonterminal), then that's a valid feature request.
from plex.
Sorry, didn't realize that I could do that.
The shorthand would be awesome tho!
from plex.
It should work to do this:
optionalSemicolon: () { => (), Semicolon => (), } ... manyStatements: ... { => ... manyStatements[sts] statement[st] optionalSemicolon => ... }
Here's an example for
demo.rs
: https://gist.github.com/goffrie/2dacbe5aefe7e4ea83d4b4da876ef39eIf you're asking for a convenient shorthand (like
Semicolon?
instead of adding a new nonterminal), then that's a valid feature request.
Correct me if i'm wrong, but I believe this causes a shift-reduce conflict?
from plex.
Related Issues (20)
- Multiple entry points
- Nightly build broken by proc_macro feature rename HOT 1
- Attribute needed to use the emit function HOT 3
- supporting error recovery?
- The crates.io version seems out of date HOT 2
- ⚠⚠⚠ Extreme compile times ⚠⚠⚠ HOT 2
- Example lexer can be simplified HOT 1
- No way to pass additional args to the lexer HOT 1
- Documentation leads to 404 error
- Token lifetime in parser
- Naming regex patterns? HOT 1
- Update to syn 1.0 HOT 1
- Warnings caused by plex macros HOT 4
- Support of start conditions
- [HELP] Function argument parser HOT 1
- Anyway to have a priority? HOT 3
- Any way to build for stable channel?
- warning: function 'reduce_11' is never used HOT 2
- Certain lexical tokens cause optional productions to shift-reduce conflict HOT 3
- One block for a set of two or more production rules?
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 plex.