SyntacticAnalysis

Lexical analyzer that tokenizes code to see if it follows the rules of a certain EBNF grammar
git clone git://mattcarlson.org/repos/SyntacticAnalysis.git
Log | Files | Refs | README

prog.txt (210B)


      1 program
      2 begin
      3 
      4 sum1 = var1 + var2;
      5 sum2 = var3 + var2 * 90;
      6 sum3 = (var2 + var1) * var3;
      7 
      8 if (sum1 < sum2) then
      9     if (var1 > var2) then
     10         var4 = sum2 - sum1;
     11 
     12 loop (var1 < var2)
     13     var5 = var4/45
     14 
     15 end