Fix Typo in CMakeLists.

Add basic nonsense grammar.
This commit is contained in:
Markus Hauschild
2013-05-31 19:13:55 +02:00
parent 50b09cfef7
commit 276a6a8499

19
grammar/grammar.y Normal file
View File

@@ -0,0 +1,19 @@
%include {
#include <iostream>
#include <string>
#include <assert.h>
}
%token_type {int}
%left PLUS MINUS.
%syntax_error {
std::cout << "Syntax error!" << std::endl;
}
program ::= expr. { }
expr ::= expr PLUS expr. { }