Fix typo in grammar.

Add lexertl.
This commit is contained in:
Markus Hauschild
2013-05-31 21:35:44 +02:00
parent 7be9545e02
commit f3d3389f54
44 changed files with 12465 additions and 2 deletions

View File

@@ -1,5 +1,6 @@
%include {
#include <cstdio>
#include <iostream>
#include <string>
#include <assert.h>
@@ -20,8 +21,8 @@
programm(A) ::= fundefs(B). { A = B; }
fundefs(A) ::= . { A = 0: }
fundefs(A) ::= fundefs fundef(B). { A = A + B: }
fundefs(A) ::= . { A = 0; }
fundefs(A) ::= fundefs fundef(B). { A = A + B; }
fundef(A) ::= type(T) T_IDENTIFIER(ID) params(P) T_BEGIN statements(S) T_END. { A = T + ID + P + S; }