Giter VIP home page Giter VIP logo

deeg's Issues

Entity Testing ToDo List

  • Program
  • Block
  • Type
  • ForStatement
    • StdFor
    • StdForIdExp
    • CountFor
    • CountsFor
  • IfStatement
    • ElseIfStatment
    • ElseStatement
  • WhileStatement
  • ReturnStatement
  • ClassDefinition
  • VariableDeclaration
    • VariableAssignment
    • VariableExpression
  • Args
  • ExpList
  • FunctionExp
  • Params
  • ParamList
  • TrailingIf
  • VariableReference
  • FieldAccess
  • IterableItem
  • Range
  • IntegerLiteral
  • FloatLiteral
  • BooleanLiteral
  • StringLiteral
  • List
  • Dict
  • BindingList
  • Binding
  • BinaryExpression
  • UnaryExpression
  • Function //

Scanner tokens

  • newline
  • ALL keywords
  • intlit
  • floatlit
  • boolit
  • stringlit
  • string interpolation
  • id
  • operators
  • type

README Suggestions

Things to clean/add

  • You claim indent-based syntax as a feature, but you use a terminal end
  • Reword "Optional type specify with ?" to be consistent with line above;
  • Can slices be like [2, 5 till 10, 12, 7]?
  • In Array/Lists section you have the word prints
  • Think about > for pattern matching, since you might have a > in an expression
  • One larger example needed

Exp ordering

As 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?

Class syntax

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.