Comments (8)
I really like this, please take a look at how this could be changed without too much impact on the interpreter.
from grammar.
This is a straightforward change to the grammar, and all the existing tests still pass, but I only made the change to modl_value_conditional
because it requires an else
clause and this new grammar will always return true
or false
. The other conditionals have optional else
clauses so we probably don't want to allow this format in those situations - do you agree @elliottinvent @alexdalitz ? (I won't commit the changes until you've had a chance to reply)
from grammar.
Yes I agree, I think this is the only way it can work. Please commit and close.
from grammar.
Change submitted.
from grammar.
This doesn't seem to be working on the new playground which @quentin-num recently put online, @alexdalitz does this work at your end? Not sure if it required an interpreter change?
from grammar.
It works on new playground using latest version so this isn't an issue.
from grammar.
This works:
_country = gb
support_contact = {country=gb?}
but this doesn't:
_country = gb
support_contact = {
country=gb?
}
from grammar.
Made a minor change to the grammar to fix this - no interpreter code changes necessary. The interpreters should work fine once their ANTLR4 files are updated. I also added a test case for it.
from grammar.
Related Issues (20)
- Possibly ambiguous expressions HOT 4
- Double negatives HOT 3
- Observation HOT 2
- Operator Precedence HOT 5
- Stray tokens files HOT 2
- Identifier names HOT 29
- Only strings in conditional tests HOT 1
- Upcase method not invoked HOT 5
- Non-UTF-8 Input Characters in tests HOT 2
- Deep object referencing in conditionals HOT 3
- Array problem HOT 6
- Standard Error Messages for Failures HOT 5
- New Built-in Method Suggestions
- Short path for loading modules HOT 1
- Graves and References Handling HOT 7
- Grammar problem - escaped grave HOT 7
- Grammar Problem - double quotes HOT 4
- File update needed for new grammar HOT 1
- Interpreter escape for % HOT 2
- String Unicode Fragment Issues
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 grammar.