sirseim / deeg Goto Github PK
View Code? Open in Web Editor NEWwe are the most awesome language to be created by mere undergrads
we are the most awesome language to be created by mere undergrads
Getter done
Currently the following is syntactically legal
7 . 2
It shouldn't be.
Things to clean/add
end
[2, 5 till 10, 12, 7]
?prints
>
for pattern matching, since you might have a >
in an expressionAs it stands right now, this is our order of Exp:
Exp0 ::= Exp1 ('if' Exp1 ('else' Exp1)?)?
Exp1 ::= Exp2 ('or' Exp2)*
Exp2 ::= Exp3 ('and' Exp3)*
Exp3 ::= Exp4 (relop Exp4)?
Exp4 ::= Exp5 (('thru'|'till') Exp5 ('by' Exp5)?)?
Exp5 ::= Exp6 (addop Exp6)*
Exp6 ::= Exp7 (mulop Exp7)*
Exp7 ::= prefixop? Exp8
Exp8 ::= Exp9 ('**' Exp5)?
Exp9 ::= Exp10 ('.' Exp10 | '[' Exp4 ']' | Args)*
Exp10 ::= boollit | intlit | floatlit | id | '(' Exp ')' | stringlit
| DictLit | ListLit
My question pertains to the ordering of the math operations and their interior Exp references.
For a piece of code like 3 ** 4 + 5
this ordering of Grammar means the result is (** 3 (+ 4 5))
. Would it make more sense for it to be (+ (** 3 4) 5)
so if you wanted (** 3 (+ 4 5))
you'd have to do 3 ** (4 + 5)
. If the later is the case, does that mean that instead of putting Exp8
above Exp5
we should instead replace the Exp5
reference within Exp8
to Exp9
, aka make Exp8
:
Exp8 ::= Exp9 ('**' Exp9)?
I'm also wondering if Exp7
should be placed below Exp8
. Under the current ordering, -3 ** -4
creates (UnaryOp - (BinaryOp ** 3 (UnaryOp - 4)))
Switching as suggested would hopefully create (BinaryOp ** (UnaryOp - 3) (UnaryOp - 4))
.
Any comments on these subjects?
We need a syntax added to syntax-sketches
for classes and their implementation.
I see something like this:
class Animal is
constructor (@name) does end
toString does deeg @name end
end
@joelhoman and @IrakliK, figure out how it works.
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.