Comments (7)
Confirmed with the TA as being a valid expression that our parser must recognize.
from csc488.
I'm not sure how that can work without breaking precedence rules.
from csc488.
For instance:
- not true * 1
- not expression
- expression
If we changed the behaviour then the precedence would change
- not true * 1
- expression * 1
- expression
This does not seem valid.
from csc488.
We just need to add more rules, roughly:
mulexpr ::= mulexpr * notexpr
addexpr ::= addexpr + notexpr
Can we see if that solves the issue?
from csc488.
I have modified grammar which compiles and parses all test samples. It is a little ugly, however...
from csc488.
I think I'm going to close this and go with "won't fix".
We can justify this in the documentation in the discussion of the failing test case. The added complexity in the grammar is not worth the trouble. While it is perhaps syntactically more valid it is certainly not semantically valid. So it would never be a problem in practice.
I'm going to just revert the commit. People can find the fix in the commit history if they have to.
If anyone has a more elegant solution they are welcome to commit it.
from csc488.
Kay. I was actually pushing for a "won't fix" by showing just how screwed up the fix would have to be.
from csc488.
Related Issues (20)
- Discover our team number and add it to the submission script
- Embed group number and CDF usernames in each A1 deliverable
- Submit assignment on CDF via submission script after all other open issues are resolved HOT 1
- Make arithmetic test verifyable
- Author README.A2 HOT 1
- Author DESIGN.pdf HOT 2
- Submit assignment on CDF HOT 1
- index of test cases
- build failed on cdf. HOT 1
- AST design document. HOT 1
- build failed on cdf (redux)
- More passing tests
- Semantic analysis & symbol table documentation
- Documentation describing implementation of pretty printing.
- IR Assembler HOT 1
- Enhanced test runner
- IR Assembler: Add source locations to error message HOT 1
- AST to IR generation
- Additional I/O tests (using @input/@output)
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 csc488.