Max Base

Results 266 comments of Max Base

And finally, I find BNF of c language: https://cs.wmich.edu/~gupta/teaching/cs4850/sumII06/The%20syntax%20of%20C%20in%20Backus-Naur%20form.htm And also another nice documentation for BNF: https://www.radford.edu/~nokie/classes/380/syntax.html

``` =============== INPUT =============== package main i8 test1 { _ 4 _ 5+1 } =============== TREE =============== Package: main [FUNC] test1 [STMT] PRINT [EXPRESSIONS] 1 expression(s) [EXPR] VALUE 4 [STMT]...

A message from Dear snappyagggodypingable: ``` a = b a += b a -= b a *= b a /= b a %= b a &= b a |= b...

ruby: ``` == === != =~ !~ = %= { /= -= += |= &= >>=

Hooray, It's mostly done and now works. :+1: I did used C operators table: https://en.cppreference.com/w/c/language/operator_precedence

**A = (2 + 15 * ( 25 - 13 ) / 1 - 4) + 10 / 2** AST TREE of The above mathematic expression: ``` [EXPR] + Left:...

Correct answer is: ``` = (2 + ((15 * (25 - 13)) / 1) - 4) + (10 / 2) ```

Below is the full implementation of EvaluateExpression function and its helpers in C#. ``` int EvaluateExpression(char[] exp) { Stack vStack = new Stack(); Stack opStack = new Stack(); opStack.Push('('); //...

Correct answer/tree is: ![photo_2021-06-09_01-35-12](https://user-images.githubusercontent.com/2658040/121257453-f4ba6900-c8c2-11eb-940b-6c4c6cf57d08.jpg) Thanks from https://github.com/carlos-chaguendo/arboles-binarios

**_ (2 + 15 * ( 25 - 13 ) / 1 - 4) + 10 / 2** Tree Output of the expression: ``` └──Statement: PRINT └──Expressions (1) └──Expression +...