/* SI 413 Fall 2011
 * Lab 5
 * This file is ex1.ypp */

%{
#include <iostream>
using namespace std;
int yylex();
int yyerror(const char* p) { cerr << "Parse error!" << endl; }
%}

%token ARROW OR SYM ;

%%
s: s rule | rule
rule: SYM ARROW rlist
rlist: rlist OR rhs | rhs
rhs: rhs SYM | SYM
%%

int main() {
  yyparse();
  return 0;
}