Commit e54e7b3d authored by POTTIER Francois's avatar POTTIER Francois

Added missing .opp.exp files for 3 tests.

parent 4f4280ed
%start s
%token LPAR
%token MINUS
%token N
%token RPAR
%type <unit> s
%%
s:
_1 = e
{ ( () )}
e:
_1 = e _2 = MINUS _3 = t
{ ( () )}
| _1 = t
{ ( () )}
t:
_1 = N
{ ( () )}
| _1 = LPAR _2 = e _3 = RPAR
{ ( () )}
%%
%start main
%token FOO
%type <unit> main
%%
main:
o = option2_option
{ ( o )}
option2_option:
_1 = FOO
{ ( () )}
%%
Note: the nonterminal symbol option (from option2.mly) is renamed option2_option.
%start main
%token <int> CHAR
%token END_OF_LET
%token EOF
%token EQ
%token <string> IDENT
%token LBRACKET
%token LET
%token PIPE
%token RANGE
%token RBRACKET
%type <Types.definition list> main
%%
main:
_1 = EOF
{ ( [] )}
| _1 = declaration _2 = main
{ ( _1::_2 )}
declaration:
_1 = LET _2 = IDENT _3 = EQ _4 = regexp _5 = END_OF_LET
{ ( { Types.id = _2 ; Types.rel = _4 } )}
regexp:
_1 = regexptoken _2 = PIPE _3 = regexp
{ ( _1::_3 )}
| _1 = regexptoken
{ ( [_1] )}
regexptoken:
_1 = CHAR
{ ( Types.Char _1 )}
| _1 = LBRACKET _2 = CHAR _3 = RANGE _4 = CHAR _5 = RBRACKET
{ ( Types.Interval (_2,_4) )}
| _1 = IDENT
{ ( Types.Identifier _1 )}
%%
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment