Comments (1)
The behaviour is expected, otherwise you would not be able to do many things in grammars.
You need quotation to be able to include the separator symbol |
or empty productions ""
. Actually every terminal symbol should be in quotes as well as whitespace, but the parser allows to use whitespace and other symbols without using quotation out of convenience. This means the following two productions produce the same output:
<expr> + <expr>
<expr>" + "<expr>
The following production is different, as it does not have any whitespaces:
<expr>+<expr>
You can use single quotes to include double quotes and vice versa. So for your grammar, I would suggest the following solution:
<src> ::= '{"Ns": [3, '<es>']}'
<es> ::= <ds>, <ds>, <ds> | <ds>, <ds>, <ds>, <ds>
<ds> ::= 1<d> | 2<d>
<d> ::= 0 | 1
BNF can be represented as a BNF. Single and double quotation is needed to do this. See the rule <literal>
as example
from ponyge2.
Related Issues (20)
- Experiment manager broken HOT 1
- Default example doesn't run HOT 5
- Examples not working HOT 2
- `regex_improvement.txt` example - confusing message? HOT 1
- `seed_run_target.txt` example doesn't work
- Please help with solution min/max boundaries ❓ HOT 6
- Tree initialisation breaks when min = max depth
- Tree initialisation operators sometimes don't achieve stated depth
- Progsys with "Compare String Lengths" not giving valuable results
- Rethink if-else-classifier?
- progsys Digits problem
- progsys 'is' and 'is not' HOT 3
- missing contents of String Differences-Embed.txt HOT 1
- Statistics parser prog in Wiki incorrectly named
- save_state not working with multicore
- load_state not working with functions in custom module
- Post-processing python phenotypes is slow
- correct genome not returned when one of the codons is zero in the tree
- progsys count odds data
- Multi-objective optimisation is slow 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 ponyge2.