goobta / expression-editor Goto Github PK
View Code? Open in Web Editor NEWCS210x Project 5
License: GNU General Public License v3.0
CS210x Project 5
License: GNU General Public License v3.0
Need to ensure that the left to right ordering of the tree is maintained. See
Important Note: While you could apply the same logic to claim (correctly) that the expression 10xz can be rearranged into zx10, you should not do so in this project. In particular, your parser should preserve the left-to-right ordering of the sub-expressions in the parse tree.
in the assignment page.
"nuff said
Creates a copy but not a deep copy
Expression.java
now has a getNode()
function. That means that all the chill'n of Expression.java
need to implement getNode()
For example, in the parenAtStartAndEndButNotSameExpression
test case, we have the expression
(420 + (32 + x)) + (911 + 69 + x)
The code goes into the first conditional, stating that "damn, since there is an open paren and a closed one at the beginning and the end, respectively, then this is a valid expression!".
Seems like the x coordinate of the mouse pointer needs to be further down than where the expression actually is.
Need to create a tester other than Whitehill's
Check out SimpleExpressionParser. In almost all of the if conditionals in the program, the following lines are always there:
if (childExpression1 == null || childExpression2 == null) {
return null;
}
childExpression1.setParent(expression);
childExpression2.setParent(expression);
expression.addSubexpression(childExpression1);
expression.addSubexpression(childExpression2);
return expression;
Any way we could factor it out?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.