Skip to content

Latest commit

 

History

History
96 lines (70 loc) · 1.2 KB

language-sytanx.md

File metadata and controls

96 lines (70 loc) · 1.2 KB

Varaibels and Const

  • =
    • int x =5
  • const =
    • const int x = 5

Mathematical and Logical expressions

  • +, -, *, /, %, , ==, !=, >, <, >=, <=

  • and , or , not , xor

Assignment statement

  • =
    • x = 5

If else statement

  • if () { } endif;

  • if () { } else { }

While loop

  • while () { }

Repeat until

  • repeat { } until ();

For loop

  • for (; ; ) { }

Switch case

  • switch () { case : break; case : break; default: }

Block structure

  • { { } }

Function

  • () { return ; }

Enum

  • enum { , , };

TODOs

  • Bison work with left recursion
    • stmt_list : stmt stmt_list | stmt ; Will be
    • stmt_list : stmt stmt_list | stmt ;