Files
scully/grammar/grammar.y
Markus Hauschild 276a6a8499 Fix Typo in CMakeLists.
Add basic nonsense grammar.
2013-05-31 19:13:55 +02:00

20 lines
245 B
Plaintext

%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. { }