Commit 169bd9ac authored by POTTIER Francois's avatar POTTIER Francois

Add a bunch of new tests, taken from opam.

parent 91aeec43
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Grammar has 18 nonterminal symbols, among which 5 start symbols.
Grammar has 29 terminal symbols.
Grammar has 55 productions.
nullable(texpr0_4) = false
nullable(texpr0_3) = false
nullable(texpr0_2) = false
nullable(texpr0_1) = false
nullable(texpr0) = false
nullable(texpr) = false
nullable(term) = false
nullable(tcons0) = false
nullable(tcons) = false
nullable(scalar0) = false
nullable(scalar) = false
nullable(linexpr0) = false
nullable(linexpr) = false
nullable(lincons) = false
nullable(id) = false
nullable(generator) = false
nullable(coeff0) = false
nullable(coeff) = false
first(texpr0_4) = TK_VAR TK_SQRT TK_MPQF TK_LPAR TK_LBRACKET TK_FLOAT TK_CAST
first(texpr0_3) = TK_VAR TK_SUB TK_SQRT TK_MPQF TK_LPAR TK_LBRACKET TK_FLOAT TK_CAST
first(texpr0_2) = TK_VAR TK_SUB TK_SQRT TK_MPQF TK_LPAR TK_LBRACKET TK_FLOAT TK_CAST
first(texpr0_1) = TK_VAR TK_SUB TK_SQRT TK_MPQF TK_LPAR TK_LBRACKET TK_FLOAT TK_CAST
first(texpr0) = TK_VAR TK_SUB TK_SQRT TK_MPQF TK_LPAR TK_LBRACKET TK_FLOAT TK_CAST
first(texpr) = TK_VAR TK_SUB TK_SQRT TK_MPQF TK_LPAR TK_LBRACKET TK_FLOAT TK_CAST
first(term) = TK_VAR TK_SUB TK_MPQF TK_LBRACKET TK_FLOAT
first(tcons0) = TK_VAR TK_SUB TK_SQRT TK_MPQF TK_LPAR TK_LBRACKET TK_FLOAT TK_CAST
first(tcons) = TK_VAR TK_SUB TK_SQRT TK_MPQF TK_LPAR TK_LBRACKET TK_FLOAT TK_CAST
first(scalar0) = TK_MPQF TK_FLOAT
first(scalar) = TK_SUB TK_MPQF TK_FLOAT
first(linexpr0) = TK_VAR TK_SUB TK_MPQF TK_LBRACKET TK_FLOAT
first(linexpr) = TK_VAR TK_SUB TK_MPQF TK_LBRACKET TK_FLOAT
first(lincons) = TK_VAR TK_SUB TK_MPQF TK_LBRACKET TK_FLOAT
first(id) = TK_VAR
first(generator) = TK_VERTEX TK_RAYMOD TK_RAY TK_LINEMOD TK_LINE
first(coeff0) = TK_MPQF TK_LBRACKET TK_FLOAT
first(coeff) = TK_SUB TK_MPQF TK_LBRACKET TK_FLOAT
minimal(texpr0_4) = (* 1 *) TK_MPQF
minimal(texpr0_3) = (* 1 *) TK_MPQF
minimal(texpr0_2) = (* 1 *) TK_MPQF
minimal(texpr0_1) = (* 1 *) TK_MPQF
minimal(texpr0) = (* 1 *) TK_MPQF
minimal(texpr) = (* 2 *) TK_MPQF TK_EOF
minimal(term) = (* 1 *) TK_MPQF
minimal(tcons0) = (* 3 *) TK_MPQF TK_EG TK_MPQF
minimal(tcons) = (* 4 *) TK_MPQF TK_EG TK_MPQF TK_EOF
minimal(scalar0) = (* 1 *) TK_MPQF
minimal(scalar) = (* 1 *) TK_MPQF
minimal(linexpr0) = (* 1 *) TK_MPQF
minimal(linexpr) = (* 2 *) TK_MPQF TK_EOF
minimal(lincons) = (* 4 *) TK_MPQF TK_EG TK_MPQF TK_EOF
minimal(id) = (* 1 *) TK_VAR
minimal(generator) = (* 3 *) TK_VERTEX TK_MPQF TK_EOF
minimal(coeff0) = (* 1 *) TK_MPQF
minimal(coeff) = (* 1 *) TK_MPQF
follow(texpr0_4) = TK_SUPEG TK_SUP TK_SUB TK_RPAR TK_POW TK_MUL TK_MODULO TK_MOD TK_INFEG TK_INF TK_EOF TK_EG TK_DIV TK_DISEG TK_ADD
follow(texpr0_3) = TK_SUPEG TK_SUP TK_SUB TK_RPAR TK_POW TK_MUL TK_MODULO TK_MOD TK_INFEG TK_INF TK_EOF TK_EG TK_DIV TK_DISEG TK_ADD
follow(texpr0_2) = TK_SUPEG TK_SUP TK_SUB TK_RPAR TK_MUL TK_MODULO TK_MOD TK_INFEG TK_INF TK_EOF TK_EG TK_DIV TK_DISEG TK_ADD
follow(texpr0_1) = TK_SUPEG TK_SUP TK_SUB TK_RPAR TK_MUL TK_MODULO TK_MOD TK_INFEG TK_INF TK_EOF TK_EG TK_DIV TK_DISEG TK_ADD
follow(texpr0) = TK_SUPEG TK_SUP TK_SUB TK_RPAR TK_MOD TK_INFEG TK_INF TK_EOF TK_EG TK_DISEG TK_ADD
follow(texpr) = #
follow(term) = TK_SUPEG TK_SUP TK_SUB TK_MOD TK_INFEG TK_INF TK_EOF TK_EG TK_DISEG TK_ADD
follow(tcons0) = TK_EOF
follow(tcons) = #
follow(scalar0) = TK_VAR TK_SUPEG TK_SUP TK_SUB TK_SEMICOLON TK_RPAR TK_RBRACKET TK_POW TK_MUL TK_MODULO TK_MOD TK_INFEG TK_INF TK_EOF TK_EG TK_DIV TK_DISEG TK_ADD
follow(scalar) = TK_SEMICOLON TK_RBRACKET
follow(linexpr0) = TK_SUPEG TK_SUP TK_SUB TK_MOD TK_INFEG TK_INF TK_EOF TK_EG TK_DISEG TK_ADD
follow(linexpr) = #
follow(lincons) = #
follow(id) = TK_SUPEG TK_SUP TK_SUB TK_RPAR TK_POW TK_MUL TK_MODULO TK_MOD TK_INFEG TK_INF TK_EOF TK_EG TK_DIV TK_DISEG TK_ADD
follow(generator) = #
follow(coeff0) = TK_VAR TK_SUPEG TK_SUP TK_SUB TK_RPAR TK_POW TK_MUL TK_MODULO TK_MOD TK_INFEG TK_INF TK_EOF TK_EG TK_DIV TK_DISEG TK_ADD
follow(coeff) = TK_VAR TK_SUPEG TK_SUP TK_SUB TK_MUL TK_MOD TK_INFEG TK_INF TK_EOF TK_EG TK_DISEG TK_ADD
Built an LR(0) automaton with 121 states.
The grammar is SLR(1).
Built an LR(1) automaton with 121 states.
49 out of 121 states have a default reduction.
41 out of 121 states are represented.
0 out of 54 symbols keep track of their start position.
0 out of 54 symbols keep track of their end position.
44 out of 60 productions exploit shiftreduce optimization.
0 out of 121 states can peek at an error.
330 functions before inlining, 40 functions after inlining.
(* Original file: apron.20160125/apron-20160125/mlapronidl/apron_parser.mly *)
/* $Id$ */
/* Syntaxical analysis to convert strings to objects. */
%{
(* This file is part of the APRON Library, released under LGPL license
with an exception allowing the redistribution of statically linked
executables.
Please read the COPYING file packaged in the distribution *)
let rec neg acc = function
| [] -> acc
| (var,coeff)::l ->
let nacc =
if Coeff.is_zero coeff then
acc
else
(var,(Coeff.neg coeff))::acc
in
neg nacc l
%}
/* \section{Lexems} %======================================================== */
%token TK_EOF
%token TK_VERTEX TK_RAY TK_LINE TK_RAYMOD TK_LINEMOD
%token TK_SUPEG TK_INFEG TK_SUP TK_INF TK_EG TK_DISEG TK_MOD
%token TK_LBRACKET TK_RBRACKET TK_SEMICOLON TK_LPAR TK_RPAR
%token <(Texpr1.typ * Texpr1.round)> TK_MUL
%token <(Texpr1.typ * Texpr1.round)> TK_ADD
%token <(Texpr1.typ * Texpr1.round)> TK_SUB
%token <(Texpr1.typ * Texpr1.round)> TK_DIV
%token <(Texpr1.typ * Texpr1.round)> TK_MODULO
%token <(Texpr1.typ * Texpr1.round)> TK_POW
%token <(Texpr1.typ * Texpr1.round)> TK_CAST
%token <(Texpr1.typ * Texpr1.round)> TK_SQRT
%token <Mpqf.t> TK_MPQF
%token <float> TK_FLOAT
%token <string> TK_VAR
%start lincons generator linexpr tcons texpr
%type <Lincons0.typ * (string*Coeff.t) list> lincons
%type <Generator0.typ * (string*Coeff.t) list> generator
%type <(string*Coeff.t) list> linexpr
%type <Tcons0.typ * Texpr1.expr> tcons
%type <Texpr1.expr> texpr
%%
/* \section{Rules} %========================================================= */
lincons:
linexpr0 TK_EG linexpr0 TK_EOF { (Lincons0.EQ, neg $1 $3) }
| linexpr0 TK_EG linexpr0 TK_MOD scalar0 TK_EOF { (Lincons0.EQMOD($5), neg $1 $3) }
| linexpr0 TK_DISEG linexpr0 TK_EOF { failwith "!= not yet supported" }
| linexpr0 TK_SUP linexpr0 TK_EOF { (Lincons0.SUP, neg $1 $3) }
| linexpr0 TK_SUPEG linexpr0 TK_EOF { (Lincons0.SUPEQ, neg $1 $3) }
| linexpr0 TK_INFEG linexpr0 TK_EOF { (Lincons0.SUPEQ, neg $3 $1) }
| linexpr0 TK_INF linexpr0 TK_EOF { (Lincons0.SUP, neg $3 $1) }
generator:
TK_VERTEX linexpr0 TK_EOF { (Generator0.VERTEX,$2) }
| TK_RAY linexpr0 TK_EOF { (Generator0.RAY,$2) }
| TK_LINE linexpr0 TK_EOF { (Generator0.LINE,$2) }
| TK_RAYMOD linexpr0 TK_EOF { (Generator0.RAYMOD,$2) }
| TK_LINEMOD linexpr0 TK_EOF { (Generator0.LINEMOD,$2) }
linexpr:
linexpr0 TK_EOF { $1 }
linexpr0:
linexpr0 TK_ADD term
{ $3::$1 }
| linexpr0 TK_SUB term
{ let (var,coeff) = $3 in (var,Coeff.neg coeff)::$1 }
| term { [$1] }
term:
coeff id { ($2,$1) }
| coeff TK_MUL id { ($3,$1) }
| coeff { ("",$1) }
| id { ($1, Coeff.s_of_int 1) }
| TK_SUB id { ($2, Coeff.s_of_int (-1)) }
tcons:
tcons0 TK_EOF { $1 }
tcons0:
texpr0 TK_EG texpr0 { (Tcons0.EQ, (Texpr1.Binop (Texpr1.Sub,$1,$3,Texpr1.Real,Texpr1.Rnd))) }
| texpr0 TK_EG texpr0 TK_MOD scalar0 { (Tcons0.EQMOD($5), (Texpr1.Binop (Texpr1.Sub,$1,$3,Texpr1.Real,Texpr1.Rnd))) }
| texpr0 TK_DISEG texpr0 { failwith "!= not yet supported" }
| texpr0 TK_SUP texpr0 { (Tcons0.SUP, (Texpr1.Binop (Texpr1.Sub,$1,$3,Texpr1.Real,Texpr1.Rnd))) }
| texpr0 TK_SUPEG texpr0 { (Tcons0.SUPEQ, (Texpr1.Binop (Texpr1.Sub,$1,$3,Texpr1.Real,Texpr1.Rnd))) }
| texpr0 TK_INFEG texpr0 { (Tcons0.SUPEQ, (Texpr1.Binop (Texpr1.Sub,$3,$1,Texpr1.Real,Texpr1.Rnd))) }
| texpr0 TK_INF texpr0 { (Tcons0.SUP, (Texpr1.Binop (Texpr1.Sub,$3,$1,Texpr1.Real,Texpr1.Rnd))) }
texpr:
texpr0 TK_EOF { $1 }
texpr0:
texpr0 TK_ADD texpr0_1
{ let (t,r) = $2 in Texpr1.Binop(Texpr1.Add,$1,$3,t,r) }
| texpr0 TK_SUB texpr0_1
{ let (t,r) = $2 in Texpr1.Binop(Texpr1.Sub,$1,$3,t,r) }
| texpr0_1
{ $1 }
texpr0_1:
texpr0_1 TK_MUL texpr0_2
{ let (t,r) = $2 in Texpr1.Binop(Texpr1.Mul,$1,$3,t,r) }
| texpr0_1 TK_DIV texpr0_2
{ let (t,r) = $2 in Texpr1.Binop(Texpr1.Div,$1,$3,t,r) }
| texpr0_1 TK_MODULO texpr0_2
{ let (t,r) = $2 in Texpr1.Binop(Texpr1.Mod,$1,$3,t,r) }
| texpr0_2
{ $1 }
texpr0_2:
| texpr0_3 TK_POW texpr0_2
{ let (t,r) = $2 in Texpr1.Binop(Texpr1.Pow,$1,$3,t,r) }
| texpr0_3
{ $1 }
texpr0_3:
TK_SUB texpr0_3
{ let (t,r) = $1 in Texpr1.Unop(Texpr1.Neg,$2,t,r) }
| texpr0_4
{ $1 }
texpr0_4:
TK_CAST texpr0_4
{ let (t,r) = $1 in Texpr1.Unop(Texpr1.Cast,$2,t,r) }
| TK_SQRT texpr0_4
{ let (t,r) = $1 in Texpr1.Unop(Texpr1.Sqrt,$2,t,r) }
| TK_LPAR texpr0 TK_RPAR
{ $2 }
| coeff0
{ Texpr1.Cst($1) }
| id
{ Texpr1.Var(Var.of_string $1) }
id:
TK_VAR { $1 }
scalar0:
TK_MPQF { Scalar.Mpqf($1) }
| TK_FLOAT { Scalar.Float($1) }
scalar:
scalar0 { $1 }
| TK_SUB scalar0 { Scalar.neg $2 }
coeff0:
scalar0
{ Coeff.Scalar $1 }
| TK_LBRACKET scalar TK_SEMICOLON scalar TK_RBRACKET
{ Coeff.Interval(Interval.of_infsup $2 $4) }
coeff:
coeff0 { $1 }
| TK_SUB coeff0 { Coeff.neg $2 }
%{
(* This file is part of the APRON Library, released under LGPL license
with an exception allowing the redistribution of statically linked
executables.
Please read the COPYING file packaged in the distribution *)
let rec neg acc = function
| [] -> acc
| (var,coeff)::l ->
let nacc =
if Coeff.is_zero coeff then
acc
else
(var,(Coeff.neg coeff))::acc
in
neg nacc l
%}
%start generator
%start lincons
%start linexpr
%start tcons
%start texpr
%token <(Texpr1.typ * Texpr1.round)> TK_ADD
%token <(Texpr1.typ * Texpr1.round)> TK_CAST
%token TK_DISEG
%token <(Texpr1.typ * Texpr1.round)> TK_DIV
%token TK_EG
%token TK_EOF
%token <float> TK_FLOAT
%token TK_INF
%token TK_INFEG
%token TK_LBRACKET
%token TK_LINE
%token TK_LINEMOD
%token TK_LPAR
%token TK_MOD
%token <(Texpr1.typ * Texpr1.round)> TK_MODULO
%token <Mpqf.t> TK_MPQF
%token <(Texpr1.typ * Texpr1.round)> TK_MUL
%token <(Texpr1.typ * Texpr1.round)> TK_POW
%token TK_RAY
%token TK_RAYMOD
%token TK_RBRACKET
%token TK_RPAR
%token TK_SEMICOLON
%token <(Texpr1.typ * Texpr1.round)> TK_SQRT
%token <(Texpr1.typ * Texpr1.round)> TK_SUB
%token TK_SUP
%token TK_SUPEG
%token <string> TK_VAR
%token TK_VERTEX
%type <Generator0.typ * (string*Coeff.t) list> generator
%type <Lincons0.typ * (string*Coeff.t) list> lincons
%type <(string*Coeff.t) list> linexpr
%type <Tcons0.typ * Texpr1.expr> tcons
%type <Texpr1.expr> texpr
%%
lincons:
_1 = linexpr0 _2 = TK_EG _3 = linexpr0 _4 = TK_EOF
{ ( (Lincons0.EQ, neg _1 _3) )}
| _1 = linexpr0 _2 = TK_EG _3 = linexpr0 _4 = TK_MOD _5 = scalar0 _6 = TK_EOF
{ ( (Lincons0.EQMOD(_5), neg _1 _3) )}
| _1 = linexpr0 _2 = TK_DISEG _3 = linexpr0 _4 = TK_EOF
{ ( failwith "!= not yet supported" )}
| _1 = linexpr0 _2 = TK_SUP _3 = linexpr0 _4 = TK_EOF
{ ( (Lincons0.SUP, neg _1 _3) )}
| _1 = linexpr0 _2 = TK_SUPEG _3 = linexpr0 _4 = TK_EOF
{ ( (Lincons0.SUPEQ, neg _1 _3) )}
| _1 = linexpr0 _2 = TK_INFEG _3 = linexpr0 _4 = TK_EOF
{ ( (Lincons0.SUPEQ, neg _3 _1) )}
| _1 = linexpr0 _2 = TK_INF _3 = linexpr0 _4 = TK_EOF
{ ( (Lincons0.SUP, neg _3 _1) )}
generator:
_1 = TK_VERTEX _2 = linexpr0 _3 = TK_EOF
{ ( (Generator0.VERTEX,_2) )}
| _1 = TK_RAY _2 = linexpr0 _3 = TK_EOF
{ ( (Generator0.RAY,_2) )}
| _1 = TK_LINE _2 = linexpr0 _3 = TK_EOF
{ ( (Generator0.LINE,_2) )}
| _1 = TK_RAYMOD _2 = linexpr0 _3 = TK_EOF
{ ( (Generator0.RAYMOD,_2) )}
| _1 = TK_LINEMOD _2 = linexpr0 _3 = TK_EOF
{ ( (Generator0.LINEMOD,_2) )}
linexpr:
_1 = linexpr0 _2 = TK_EOF
{ ( _1 )}
linexpr0:
_1 = linexpr0 _2 = TK_ADD _3 = term
{ ( _3::_1 )}
| _1 = linexpr0 _2 = TK_SUB _3 = term
{( let (var,coeff) = _3 in (var,Coeff.neg coeff)::_1 )}
| _1 = term
{ ( [_1] )}
term:
_1 = coeff _2 = id
{ ( (_2,_1) )}
| _1 = coeff _2 = TK_MUL _3 = id
{ ( (_3,_1) )}
| _1 = coeff
{ ( ("",_1) )}
| _1 = id
{ ( (_1, Coeff.s_of_int 1) )}
| _1 = TK_SUB _2 = id
{ ( (_2, Coeff.s_of_int (-1)) )}
tcons:
_1 = tcons0 _2 = TK_EOF
{ ( _1 )}
tcons0:
_1 = texpr0 _2 = TK_EG _3 = texpr0
{ ( (Tcons0.EQ, (Texpr1.Binop (Texpr1.Sub,_1,_3,Texpr1.Real,Texpr1.Rnd))) )}
| _1 = texpr0 _2 = TK_EG _3 = texpr0 _4 = TK_MOD _5 = scalar0
{ ( (Tcons0.EQMOD(_5), (Texpr1.Binop (Texpr1.Sub,_1,_3,Texpr1.Real,Texpr1.Rnd))) )}
| _1 = texpr0 _2 = TK_DISEG _3 = texpr0
{ ( failwith "!= not yet supported" )}
| _1 = texpr0 _2 = TK_SUP _3 = texpr0
{ ( (Tcons0.SUP, (Texpr1.Binop (Texpr1.Sub,_1,_3,Texpr1.Real,Texpr1.Rnd))) )}
| _1 = texpr0 _2 = TK_SUPEG _3 = texpr0
{ ( (Tcons0.SUPEQ, (Texpr1.Binop (Texpr1.Sub,_1,_3,Texpr1.Real,Texpr1.Rnd))) )}
| _1 = texpr0 _2 = TK_INFEG _3 = texpr0
{ ( (Tcons0.SUPEQ, (Texpr1.Binop (Texpr1.Sub,_3,_1,Texpr1.Real,Texpr1.Rnd))) )}
| _1 = texpr0 _2 = TK_INF _3 = texpr0
{ ( (Tcons0.SUP, (Texpr1.Binop (Texpr1.Sub,_3,_1,Texpr1.Real,Texpr1.Rnd))) )}
texpr:
_1 = texpr0 _2 = TK_EOF
{ ( _1 )}
texpr0:
_1 = texpr0 _2 = TK_ADD _3 = texpr0_1
{ ( let (t,r) = _2 in Texpr1.Binop(Texpr1.Add,_1,_3,t,r) )}
| _1 = texpr0 _2 = TK_SUB _3 = texpr0_1
{ ( let (t,r) = _2 in Texpr1.Binop(Texpr1.Sub,_1,_3,t,r) )}
| _1 = texpr0_1
{ ( _1 )}
texpr0_1:
_1 = texpr0_1 _2 = TK_MUL _3 = texpr0_2
{ ( let (t,r) = _2 in Texpr1.Binop(Texpr1.Mul,_1,_3,t,r) )}
| _1 = texpr0_1 _2 = TK_DIV _3 = texpr0_2
{ ( let (t,r) = _2 in Texpr1.Binop(Texpr1.Div,_1,_3,t,r) )}
| _1 = texpr0_1 _2 = TK_MODULO _3 = texpr0_2
{ ( let (t,r) = _2 in Texpr1.Binop(Texpr1.Mod,_1,_3,t,r) )}
| _1 = texpr0_2
{ ( _1 )}
texpr0_2:
_1 = texpr0_3 _2 = TK_POW _3 = texpr0_2
{ ( let (t,r) = _2 in Texpr1.Binop(Texpr1.Pow,_1,_3,t,r) )}
| _1 = texpr0_3
{ ( _1 )}
texpr0_3:
_1 = TK_SUB _2 = texpr0_3
{ ( let (t,r) = _1 in Texpr1.Unop(Texpr1.Neg,_2,t,r) )}
| _1 = texpr0_4
{ ( _1 )}
texpr0_4:
_1 = TK_CAST _2 = texpr0_4
{ ( let (t,r) = _1 in Texpr1.Unop(Texpr1.Cast,_2,t,r) )}
| _1 = TK_SQRT _2 = texpr0_4
{ ( let (t,r) = _1 in Texpr1.Unop(Texpr1.Sqrt,_2,t,r) )}
| _1 = TK_LPAR _2 = texpr0 _3 = TK_RPAR
{ ( _2 )}
| _1 = coeff0
{ ( Texpr1.Cst(_1) )}
| _1 = id
{ ( Texpr1.Var(Var.of_string _1) )}
id:
_1 = TK_VAR
{ ( _1 )}
scalar0:
_1 = TK_MPQF
{ ( Scalar.Mpqf(_1) )}
| _1 = TK_FLOAT
{ ( Scalar.Float(_1) )}
scalar:
_1 = scalar0
{ ( _1 )}
| _1 = TK_SUB _2 = scalar0
{ ( Scalar.neg _2 )}
coeff0:
_1 = scalar0
{ ( Coeff.Scalar _1 )}
| _1 = TK_LBRACKET _2 = scalar _3 = TK_SEMICOLON _4 = scalar _5 = TK_RBRACKET
{ ( Coeff.Interval(Interval.of_infsup _2 _4) )}
coeff:
_1 = coeff0
{ ( _1 )}
| _1 = TK_SUB _2 = coeff0
{ ( Coeff.neg _2 )}
%%
Grammar has 24 nonterminal symbols, among which 1 start symbols.
Grammar has 55 terminal symbols.
Grammar has 82 productions.
nullable(value_info) = true
nullable(typ) = false
nullable(separated_nonempty_list(COMMA,exp)) = false
nullable(separated_nonempty_list(COMMA,event_arg)) = false
nullable(separated_nonempty_list(COMMA,arg)) = false
nullable(sentence) = false
nullable(reentrance_info) = false
nullable(option(exp)) = true
nullable(msg_info) = false
nullable(loption(separated_nonempty_list(COMMA,exp))) = true
nullable(loption(separated_nonempty_list(COMMA,event_arg))) = true
nullable(loption(separated_nonempty_list(COMMA,arg))) = true
nullable(list(sentence)) = true
nullable(list(contract)) = true
nullable(list(case)) = true
nullable(lexp) = false
nullable(file) = false
nullable(exp) = false
nullable(event_arg) = false
nullable(contract) = false
nullable(case_header) = false
nullable(case) = false
nullable(block) = false
nullable(arg) = false
first(value_info) = ALONG
first(typ) = UINT8 UINT256 IDENT BYTES32 BOOL ADDRESS
first(separated_nonempty_list(COMMA,exp)) = VALUE TRUE THIS SENDER NOW NOT LPAR IDENT FALSE DEPLOY DECLIT8 DECLIT256 BALANCE ADDRESS
first(separated_nonempty_list(COMMA,event_arg)) = UINT8 UINT256 IDENT BYTES32 BOOL ADDRESS
first(separated_nonempty_list(COMMA,arg)) = UINT8 UINT256 IDENT BYTES32 BOOL ADDRESS
first(sentence) = VOID VALUE UINT8 UINT256 TRUE THIS SENDER SELFDESTRUCT RETURN NOW NOT LPAR LOG IF IDENT FALSE DEPLOY DECLIT8 DECLIT256 BYTES32 BOOL BALANCE ADDRESS ABORT
first(reentrance_info) = REENTRANCE
first(option(exp)) = VALUE TRUE THIS SENDER NOW NOT LPAR IDENT FALSE DEPLOY DECLIT8 DECLIT256 BALANCE ADDRESS
first(msg_info) = REENTRANCE ALONG
first(loption(separated_nonempty_list(COMMA,exp))) = VALUE TRUE THIS SENDER NOW NOT LPAR IDENT FALSE DEPLOY DECLIT8 DECLIT256 BALANCE ADDRESS
first(loption(separated_nonempty_list(COMMA,event_arg))) = UINT8 UINT256 IDENT BYTES32 BOOL ADDRESS
first(loption(separated_nonempty_list(COMMA,arg))) = UINT8 UINT256 IDENT BYTES32 BOOL ADDRESS
first(list(sentence)) = VOID VALUE UINT8 UINT256 TRUE THIS SENDER SELFDESTRUCT RETURN NOW NOT LPAR LOG IF IDENT FALSE DEPLOY DECLIT8 DECLIT256 BYTES32 BOOL BALANCE ADDRESS ABORT
first(list(contract)) = EVENT CONTRACT
first(list(case)) = DEFAULT CASE
first(lexp) = VALUE TRUE THIS SENDER NOW NOT LPAR IDENT FALSE DEPLOY DECLIT8 DECLIT256 BALANCE ADDRESS
first(file) = EVENT EOF CONTRACT
first(exp) = VALUE TRUE THIS SENDER NOW NOT LPAR IDENT FALSE DEPLOY DECLIT8 DECLIT256 BALANCE ADDRESS
first(event_arg) = UINT8 UINT256 IDENT BYTES32 BOOL ADDRESS
first(contract) = EVENT CONTRACT
first(case_header) = DEFAULT CASE
first(case) = DEFAULT CASE
first(block) = LBRACE
first(arg) = UINT8 UINT256 IDENT BYTES32 BOOL ADDRESS
minimal(value_info) = (* 0 *)
minimal(typ) = (* 1 *) UINT256
minimal(separated_nonempty_list(COMMA,exp)) = (* 1 *) TRUE
minimal(separated_nonempty_list(COMMA,event_arg)) = (* 2 *) UINT256 IDENT
minimal(separated_nonempty_list(COMMA,arg)) = (* 2 *) UINT256 IDENT
minimal(sentence) = (* 2 *) ABORT SEMICOLON
minimal(reentrance_info) = (* 3 *) REENTRANCE LBRACE RBRACE
minimal(option(exp)) = (* 0 *)
minimal(msg_info) = (* 3 *) REENTRANCE LBRACE RBRACE
minimal(loption(separated_nonempty_list(COMMA,exp))) = (* 0 *)
minimal(loption(separated_nonempty_list(COMMA,event_arg))) = (* 0 *)
minimal(loption(separated_nonempty_list(COMMA,arg))) = (* 0 *)
minimal(list(sentence)) = (* 0 *)
minimal(list(contract)) = (* 0 *)
minimal(list(case)) = (* 0 *)
minimal(lexp) = (* 4 *) TRUE LSQBR TRUE RSQBR
minimal(file) = (* 1 *) EOF
minimal(exp) = (* 1 *) TRUE
minimal(event_arg) = (* 2 *) UINT256 IDENT
minimal(contract) = (* 5 *) EVENT IDENT LPAR RPAR SEMICOLON
minimal(case_header) = (* 1 *) DEFAULT
minimal(case) = (* 3 *) DEFAULT LBRACE RBRACE
minimal(block) = (* 2 *) LBRACE RBRACE
minimal(arg) = (* 2 *) UINT256 IDENT
follow(value_info) = REENTRANCE
follow(typ) = RARROW INDEXED IDENT
follow(separated_nonempty_list(COMMA,exp)) = RPAR
follow(separated_nonempty_list(COMMA,event_arg)) = RPAR
follow(separated_nonempty_list(COMMA,arg)) = RPAR
follow(sentence) = VOID VALUE UINT8 UINT256 TRUE THIS SENDER SELFDESTRUCT RETURN RBRACE NOW NOT LPAR LOG IF IDENT FALSE ELSE DEPLOY DECLIT8 DECLIT256 BYTES32 BOOL BALANCE ADDRESS ABORT
follow(reentrance_info) = THEN SEMICOLON RSQBR RPAR REENTRANCE PLUS NEQ MULT MINUS LT LSQBR LAND GT EQUALITY DOT COMMA
follow(option(exp)) = THEN
follow(msg_info) = THEN SEMICOLON RSQBR RPAR REENTRANCE PLUS NEQ MULT MINUS LT LSQBR LAND GT EQUALITY DOT COMMA
follow(loption(separated_nonempty_list(COMMA,exp))) = RPAR
follow(loption(separated_nonempty_list(COMMA,event_arg))) = RPAR
follow(loption(separated_nonempty_list(COMMA,arg))) = RPAR
follow(list(sentence)) = RBRACE
follow(list(contract)) = EOF
follow(list(case)) = RBRACE
follow(lexp) = THEN SINGLE_EQ SEMICOLON RSQBR RPAR REENTRANCE PLUS NEQ MULT MINUS LT LSQBR LAND GT EQUALITY DOT COMMA
follow(file) = #
follow(exp) = THEN SEMICOLON RSQBR RPAR REENTRANCE PLUS NEQ MULT MINUS LT LSQBR LAND GT EQUALITY DOT COMMA
follow(event_arg) = RPAR COMMA
follow(contract) = EVENT EOF CONTRACT
follow(case_header) = LBRACE
follow(case) = RBRACE DEFAULT CASE
follow(block) = VOID VALUE UINT8 UINT256 TRUE THIS THEN SENDER SEMICOLON SELFDESTRUCT RSQBR RPAR RETURN REENTRANCE RBRACE PLUS NOW NOT NEQ MULT MINUS LT LSQBR LPAR LOG LAND IF IDENT GT FALSE EQUALITY ELSE DOT DEPLOY DEFAULT DECLIT8 DECLIT256 COMMA CASE BYTES32 BOOL BALANCE ADDRESS ABORT
follow(arg) = RPAR COMMA
Built an LR(0) automaton with 192 states.
The grammar is not SLR(1) -- 12 states have a conflict.
Built an LR(1) automaton with 192 states.
65 shift/reduce conflicts were silently solved.
Warning: 11 states have shift/reduce conflicts.
Warning: 28 shift/reduce conflicts were arbitrarily resolved.
57 out of 192 states have a default reduction.
48 out of 192 states are represented.
0 out of 82 symbols keep track of their start position.
0 out of 82 symbols keep track of their end position.
44 out of 83 productions exploit shiftreduce optimization.
0 out of 192 states can peek at an error.
497 functions before inlining, 79 functions after inlining.
(* Original file: bamboo.0.0.03/bamboo-0.0.03/src/parse/parser.mly *)
%token CONTRACT
%token <string> IDENT
%token <WrapBn.t> DECLIT256
%token <WrapBn.t> DECLIT8
%token ADDRESS
%token UINT256
%token UINT8
%token BYTES32
%token BOOL
%token LPAR</