Specy / rooc

A language for compiling formal mathematical models into static models which are transformed to be solved
https://rooc.specy.app
MIT License
4 stars 0 forks source link

Improve UnaryOperator #4

Closed Specy closed 9 months ago

Specy commented 10 months ago

Currently the unary operators are a sort of hack, they don't keep operator precedence or associativity, the shunting yard algorithm should be improved to allow for decent unary operators (PreExp::UnaryOperation), everything in the compiler and execution engine works already, only the parser should be changed https://github.com/Specy/rooc/blob/71b0abf7ee4bb1c9f795e51aa099041652539e63/src/parser/rules_parser.rs#L329

Specy commented 9 months ago

Solve in 191a85f, but regressed to not allow implicit multiplication as that cannot be expressed in the grammar (currently?)