Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
POTTIER Francois
menhir
Commits
004933c6
Commit
004933c6
authored
Apr 28, 2016
by
POTTIER Francois
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Re-generated expected output after "leading bar" change in grammar printer.
parent
2be6d472
Changes
220
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
75 changed files
with
3071 additions
and
3071 deletions
+3071
-3071
bench/good/JSParse.opp.exp
bench/good/JSParse.opp.exp
+117
-117
bench/good/K3Parser.opp.exp
bench/good/K3Parser.opp.exp
+53
-53
bench/good/albatross.opp.exp
bench/good/albatross.opp.exp
+91
-91
bench/good/alphaCaml-demos-interactive.opp.exp
bench/good/alphaCaml-demos-interactive.opp.exp
+2
-2
bench/good/alphaCaml-demos-mixins.opp.exp
bench/good/alphaCaml-demos-mixins.opp.exp
+13
-13
bench/good/alphaCaml-demos-poplmark.opp.exp
bench/good/alphaCaml-demos-poplmark.opp.exp
+19
-19
bench/good/alphaCaml.opp.exp
bench/good/alphaCaml.opp.exp
+27
-27
bench/good/alphaprolog.opp.exp
bench/good/alphaprolog.opp.exp
+34
-34
bench/good/amalthea.opp.exp
bench/good/amalthea.opp.exp
+14
-14
bench/good/anonymous.opp.exp
bench/good/anonymous.opp.exp
+3
-3
bench/good/atd_parser.opp.exp
bench/good/atd_parser.opp.exp
+21
-21
bench/good/attapl-deptypes.opp.exp
bench/good/attapl-deptypes.opp.exp
+15
-15
bench/good/attapl-mini.opp.exp
bench/good/attapl-mini.opp.exp
+28
-28
bench/good/bauer.opp.exp
bench/good/bauer.opp.exp
+9
-9
bench/good/belloeil.opp.exp
bench/good/belloeil.opp.exp
+3
-3
bench/good/bibtex_parser.opp.exp
bench/good/bibtex_parser.opp.exp
+9
-9
bench/good/bison-mysterious-conflict.opp.exp
bench/good/bison-mysterious-conflict.opp.exp
+6
-6
bench/good/boris-mini.opp.exp
bench/good/boris-mini.opp.exp
+3
-3
bench/good/bran.opp.exp
bench/good/bran.opp.exp
+78
-78
bench/good/c.opp.exp
bench/good/c.opp.exp
+63
-63
bench/good/c_unambiguous.opp.exp
bench/good/c_unambiguous.opp.exp
+68
-68
bench/good/calc-anonymous.opp.exp
bench/good/calc-anonymous.opp.exp
+2
-2
bench/good/calc-locations.opp.exp
bench/good/calc-locations.opp.exp
+2
-2
bench/good/calc.opp.exp
bench/good/calc.opp.exp
+2
-2
bench/good/christian.opp.exp
bench/good/christian.opp.exp
+285
-285
bench/good/cigen-cparser.opp.exp
bench/good/cigen-cparser.opp.exp
+27
-27
bench/good/cil-cparser.opp.exp
bench/good/cil-cparser.opp.exp
+116
-116
bench/good/cil-formatparse.opp.exp
bench/good/cil-formatparse.opp.exp
+28
-28
bench/good/cime-coq.opp.exp
bench/good/cime-coq.opp.exp
+15
-15
bench/good/cime-genpoly.opp.exp
bench/good/cime-genpoly.opp.exp
+7
-7
bench/good/cime-parameterized-signatures.opp.exp
bench/good/cime-parameterized-signatures.opp.exp
+16
-16
bench/good/cime-poly-interp.opp.exp
bench/good/cime-poly-interp.opp.exp
+7
-7
bench/good/cime-poly.opp.exp
bench/good/cime-poly.opp.exp
+4
-4
bench/good/cime-signature.opp.exp
bench/good/cime-signature.opp.exp
+6
-6
bench/good/cime-syntax.opp.exp
bench/good/cime-syntax.opp.exp
+58
-58
bench/good/cime-term.opp.exp
bench/good/cime-term.opp.exp
+6
-6
bench/good/cime-terms-signature.opp.exp
bench/good/cime-terms-signature.opp.exp
+12
-12
bench/good/cime-terms.opp.exp
bench/good/cime-terms.opp.exp
+20
-20
bench/good/cime-theory.opp.exp
bench/good/cime-theory.opp.exp
+7
-7
bench/good/cime-toplevel.opp.exp
bench/good/cime-toplevel.opp.exp
+8
-8
bench/good/cime-word.opp.exp
bench/good/cime-word.opp.exp
+10
-10
bench/good/cminor.opp.exp
bench/good/cminor.opp.exp
+24
-24
bench/good/cocci.opp.exp
bench/good/cocci.opp.exp
+198
-198
bench/good/coercion-constraint.opp.exp
bench/good/coercion-constraint.opp.exp
+26
-26
bench/good/coercion-mini.opp.exp
bench/good/coercion-mini.opp.exp
+48
-48
bench/good/compcert_pre_parser.opp.exp
bench/good/compcert_pre_parser.opp.exp
+104
-104
bench/good/compcert_pre_parser_new.opp.exp
bench/good/compcert_pre_parser_new.opp.exp
+145
-145
bench/good/compsyn.opp.exp
bench/good/compsyn.opp.exp
+156
-156
bench/good/condition_parser.opp.exp
bench/good/condition_parser.opp.exp
+4
-4
bench/good/confluence-fnf.opp.exp
bench/good/confluence-fnf.opp.exp
+14
-14
bench/good/confluence-psl.opp.exp
bench/good/confluence-psl.opp.exp
+21
-21
bench/good/confluence.opp.exp
bench/good/confluence.opp.exp
+34
-34
bench/good/couac.opp.exp
bench/good/couac.opp.exp
+14
-14
bench/good/cutdown.opp.exp
bench/good/cutdown.opp.exp
+7
-7
bench/good/dario.opp.exp
bench/good/dario.opp.exp
+5
-5
bench/good/dml.opp.exp
bench/good/dml.opp.exp
+67
-67
bench/good/docOckXmlParser.opp.exp
bench/good/docOckXmlParser.opp.exp
+159
-159
bench/good/dule.opp.exp
bench/good/dule.opp.exp
+52
-52
bench/good/duplicated_prec.opp.exp
bench/good/duplicated_prec.opp.exp
+3
-3
bench/good/efuns.opp.exp
bench/good/efuns.opp.exp
+3
-3
bench/good/empty-action.opp.exp
bench/good/empty-action.opp.exp
+2
-2
bench/good/end-of-stream-conflict.opp.exp
bench/good/end-of-stream-conflict.opp.exp
+1
-1
bench/good/execparser.opp.exp
bench/good/execparser.opp.exp
+42
-42
bench/good/featherweight.opp.exp
bench/good/featherweight.opp.exp
+22
-22
bench/good/filiot.opp.exp
bench/good/filiot.opp.exp
+7
-7
bench/good/flowcaml-docgen.opp.exp
bench/good/flowcaml-docgen.opp.exp
+2
-2
bench/good/flowcaml.opp.exp
bench/good/flowcaml.opp.exp
+129
-129
bench/good/focc-pure-def.opp.exp
bench/good/focc-pure-def.opp.exp
+6
-6
bench/good/foo.opp.exp
bench/good/foo.opp.exp
+1
-1
bench/good/fork.opp.exp
bench/good/fork.opp.exp
+23
-23
bench/good/fp.opp.exp
bench/good/fp.opp.exp
+7
-7
bench/good/framac-cparser.opp.exp
bench/good/framac-cparser.opp.exp
+140
-140
bench/good/framac-print_api-grammar.opp.exp
bench/good/framac-print_api-grammar.opp.exp
+3
-3
bench/good/fsharp.opp.exp
bench/good/fsharp.opp.exp
+276
-276
bench/good/fslexpars.opp.exp
bench/good/fslexpars.opp.exp
+12
-12
No files found.
bench/good/JSParse.opp.exp
View file @
004933c6
This diff is collapsed.
Click to expand it.
bench/good/K3Parser.opp.exp
View file @
004933c6
...
...
@@ -254,13 +254,13 @@ Warning: symbol integer_list is unreachable from any of the start symbol(s).
%%
program:
|
_1 = declaration
_1 = declaration
{ ( if !numerrors>=1 then raise Exit else [_1, []] )}
| _1 = declaration _2 = program
{ ( (_1, []) :: _2 )}
declaration:
|
_1 = DECLARE _2 = IDENTIFIER _3 = COLON _4 = type_expr
_1 = DECLARE _2 = IDENTIFIER _3 = COLON _4 = type_expr
{ ( Global(_2, _4, None) )}
| _1 = DECLARE _2 = IDENTIFIER _3 = COLON _4 = type_expr _5 = GETS _6 = anno_expr
{ ( Global(_2, _4, Some _6) )}
...
...
@@ -294,13 +294,13 @@ declaration:
{ ( id_error() )}
flow_program:
|
_1 = flow_statement
_1 = flow_statement
{ ( [_1, []] )}
| _1 = flow_statement _2 = flow_program
{ ( (_1,[]) :: _2 )}
flow_statement:
|
_1 = resource
_1 = resource
{ ( _1 )}
| _1 = instruction
{ ( Instruction(_1) )}
...
...
@@ -333,11 +333,11 @@ flow_statement:
{ ( print_error("Invalid bind source") )}
instruction:
|
_1 = CONSUME _2 = IDENTIFIER
_1 = CONSUME _2 = IDENTIFIER
{ ( Consume(_2) )}
resource:
|
_1 = SOURCE _2 = IDENTIFIER _3 = COLON _4 = type_expr _5 = GETS _6 = handle
_1 = SOURCE _2 = IDENTIFIER _3 = COLON _4 = type_expr _5 = GETS _6 = handle
{ (
let channel_type, channel_format = _6
in Source(Resource(_2, Handle(_4, channel_type, channel_format)))
...
...
@@ -361,19 +361,19 @@ resource:
)}
handle:
|
_1 = FILE _2 = LPAREN _3 = STRING _4 = COMMA _5 = IDENTIFIER _6 = RPAREN
_1 = FILE _2 = LPAREN _3 = STRING _4 = COMMA _5 = IDENTIFIER _6 = RPAREN
{ ( File(_3), parse_format _5 )}
| _1 = SOCKET _2 = LPAREN _3 = STRING _4 = COMMA _5 = INTEGER _6 = COMMA _7 = IDENTIFIER _8 = RPAREN
{ ( Network(_3, _5), parse_format _7 )}
stream:
|
_1 = STREAM _2 = LPAREN _3 = anno_expr _4 = RPAREN
_1 = STREAM _2 = LPAREN _3 = anno_expr _4 = RPAREN
{ ( ConstStream(_3) )}
| _1 = RANDOM _2 = LPAREN _3 = INTEGER _4 = RPAREN
{ ( RandomStream(_3) )}
resource_pattern:
|
_1 = IDENTIFIER
_1 = IDENTIFIER
{ ( Terminal(_1) )}
| _1 = LPAREN _2 = resource_pattern _3 = RPAREN
{ ( _2 )}
...
...
@@ -393,17 +393,17 @@ resource_pattern:
)}
annotations:
|
_1 = annotation
_1 = annotation
{ ( [_1] )}
| _1 = annotation _2 = SEMICOLON _3 = annotations
{ ( _1::_3 )}
annotation:
|
_1 = identifier_stream
_1 = identifier_stream
{ ( Property(String.concat " " _1) )}
type_expr:
|
_1 = type_expr _2 = RARROW _3 = fn_type_expr_list %prec UMINUS
_1 = type_expr _2 = RARROW _3 = fn_type_expr_list %prec UMINUS
{ ( let is, o = list_split (-1) (_1::_3) in
match (hd o).typ with
| TFunction(is', o') -> wrap_tfunc (is@is') o'
...
...
@@ -425,29 +425,29 @@ type_expr:
{ ( let c, anno = _1 in { (canonical c) with anno} )}
fn_type_expr_list:
|
_1 = type_expr _2 = RARROW _3 = fn_type_expr_list
_1 = type_expr _2 = RARROW _3 = fn_type_expr_list
{ ( _1 :: _3 )}
| _1 = type_expr
{ ( [_1] )}
type_expr_tuple:
|
_1 = type_expr_list
_1 = type_expr_list
{ ( wrap_ttuple _1 )}
type_expr_list:
|
_1 = type_expr
_1 = type_expr
{ ( [_1] )}
| _1 = type_expr _2 = COMMA _3 = type_expr_list
{ ( _1 :: _3 )}
annotated_collection_type:
|
_1 = collection_type
_1 = collection_type
{ ( _1, [] )}
| _1 = collection_type _2 = ANNOTATE _3 = LBRACE _4 = annotations _5 = RBRACE
{ ( _1, _4 )}
collection_type:
|
_1 = LBRACE _2 = type_expr _3 = RBRACE
_1 = LBRACE _2 = type_expr _3 = RBRACE
{ ( TCollection(TSet, _2) )}
| _1 = LBRACE _2 = type_expr_tuple _3 = RBRACE
{ ( TCollection(TSet, _2) )}
...
...
@@ -485,25 +485,25 @@ collection_type:
{ ( TCollection(TSortedSet, _2) )}
int_list_list:
|
_1 = int_list
_1 = int_list
{ ([_1])}
| _1 = int_list _2 = SEMICOLON _3 = int_list_list
{ ( _1::_3 )}
int_list:
|
_1 = INTEGER
_1 = INTEGER
{ ([_1])}
| _1 = INTEGER _2 = COMMA _3 = int_list
{ ( _1::_3 )}
anno_expr:
|
_1 = expr _2 = ANNOTATE _3 = LBRACE _4 = annotations _5 = RBRACE
_1 = expr _2 = ANNOTATE _3 = LBRACE _4 = annotations _5 = RBRACE
{ ( K3Util.add_annos _4 _1 )}
| _1 = expr
{ ( _1 )}
expr:
|
_1 = LPAREN _2 = tuple _3 = RPAREN
_1 = LPAREN _2 = tuple _3 = RPAREN
{ ( _2 )}
| _1 = block
{ ( _1 )}
...
...
@@ -571,47 +571,47 @@ expr:
{ ( print_error("Function application error") )}
id_unknown:
|
_1 = UNKNOWN
_1 = UNKNOWN
{ ( "_" )}
| _1 = IDENTIFIER
{ ( _1 )}
id_list:
|
_1 = id_unknown
_1 = id_unknown
{ ( [_1] )}
| _1 = id_unknown _2 = COMMA _3 = id_list
{ ( _1 :: _3 )}
expr_list:
|
_1 = anno_expr
_1 = anno_expr
{ ( [_1] )}
| _1 = anno_expr _2 = COMMA _3 = expr_list
{ ( _1 :: _3 )}
expr_seq:
|
_1 = tuple
_1 = tuple
{ ( [_1] )}
| _1 = tuple _2 = SEMICOLON _3 = expr_seq
{ ( _1 :: _3 )}
tuple:
|
_1 = expr_list
_1 = expr_list
{ ( if List.length _1 = 1 then List.hd _1 else mkexpr Tuple _1 )}
value_typed_identifier:
|
_1 = IDENTIFIER _2 = COLON _3 = type_expr
_1 = IDENTIFIER _2 = COLON _3 = type_expr
{ ( (_1, _3) )}
| _1 = IDENTIFIER _2 = COLON _3 = error
{ ( type_error() )}
value_typed_identifier_list:
|
_1 = value_typed_identifier
_1 = value_typed_identifier
{ ( [_1] )}
| _1 = value_typed_identifier _2 = COMMA _3 = value_typed_identifier_list
{ ( _1 :: _3 )}
arg:
|
_1 = LPAREN _2 = arg_list _3 = RPAREN
_1 = LPAREN _2 = arg_list _3 = RPAREN
{ ( ATuple(_2) )}
| _1 = UNKNOWN
{ ( AIgnored )}
...
...
@@ -619,13 +619,13 @@ arg:
{ ( AVar(fst _1, snd _1) )}
arg_list:
|
_1 = arg
_1 = arg
{ ( [(_1)] )}
| _1 = arg _2 = COMMA _3 = arg_list
{ ( _1 :: _3 )}
constant:
|
_1 = UNKNOWN
_1 = UNKNOWN
{ ( CUnknown )}
| _1 = UNIT
{ ( CUnit )}
...
...
@@ -641,7 +641,7 @@ constant:
{ ( _1 )}
range:
|
_1 = LBRACE _2 = anno_expr _3 = COLON _4 = COLON _5 = anno_expr _6 = COLON _7 = COLON _8 = anno_expr _9 = RBRACE
_1 = LBRACE _2 = anno_expr _3 = COLON _4 = COLON _5 = anno_expr _6 = COLON _7 = COLON _8 = anno_expr _9 = RBRACE
{ ( mkexpr (Range(TSet)) [_2; _5; _8] )}
| _1 = LBRACEBAR _2 = anno_expr _3 = COLON _4 = COLON _5 = anno_expr _6 = COLON _7 = COLON _8 = anno_expr _9 = RBRACEBAR
{ ( mkexpr (Range(TBag)) [_2; _5; _8] )}
...
...
@@ -651,7 +651,7 @@ range:
{ ( mkexpr (Range(TVector)) [_2; _5; _8] )}
collection:
|
_1 = LBRACE _2 = RBRACE _3 = COLON _4 = type_expr
_1 = LBRACE _2 = RBRACE _3 = COLON _4 = type_expr
{ ( build_collection [] _4 )}
| _1 = LBRACEBAR _2 = RBRACEBAR _3 = COLON _4 = type_expr
{ ( build_collection [] _4 )}
...
...
@@ -699,11 +699,11 @@ collection:
{ ( build_collection _2 (mk_unknown_collection (TVMap None)) )}
variable:
|
_1 = IDENTIFIER
_1 = IDENTIFIER
{ ( _1 )}
address:
|
_1 = IDENTIFIER _2 = COLON _3 = INTEGER
_1 = IDENTIFIER _2 = COLON _3 = INTEGER
{ ( CAddress(_1,_3) )}
| _1 = IP _2 = COLON _3 = INTEGER
{ (
...
...
@@ -714,7 +714,7 @@ address:
)}
arithmetic:
|
_1 = NEG _2 = anno_expr
_1 = NEG _2 = anno_expr
{ ( mkexpr Neg [_2] )}
| _1 = anno_expr _2 = PLUS _3 = anno_expr
{ ( mkexpr Add [_1; _3] )}
...
...
@@ -738,7 +738,7 @@ arithmetic:
{ ( arith_error 2 )}
predicate:
|
_1 = NOT _2 = anno_expr
_1 = NOT _2 = anno_expr
{ ( mkexpr Neg [_2] )}
| _1 = anno_expr _2 = AND _3 = anno_expr
{ ( mkexpr Mult [_1; _3] )}
...
...
@@ -770,7 +770,7 @@ predicate:
{ ( comp_error() )}
conditional:
|
_1 = IF _2 = anno_expr _3 = THEN _4 = anno_expr _5 = ELSE _6 = anno_expr
_1 = IF _2 = anno_expr _3 = THEN _4 = anno_expr _5 = ELSE _6 = anno_expr
{ ( mkexpr IfThenElse [_2; _4; _6] )}
| _1 = IF _2 = anno_expr _3 = THEN _4 = anno_expr _5 = ELSE _6 = error
{ ( cond_error "else branch" )}
...
...
@@ -780,7 +780,7 @@ conditional:
{ ( cond_error "predicate" )}
case:
|
_1 = CASE _2 = anno_expr _3 = OF _4 = LBRACE _5 = JUST _6 = id_unknown _7 = RARROW _8 = anno_expr _9 = RBRACE _10 = LBRACE _11 = NOTHING _12 = RARROW _13 = anno_expr _14 = RBRACE
_1 = CASE _2 = anno_expr _3 = OF _4 = LBRACE _5 = JUST _6 = id_unknown _7 = RARROW _8 = anno_expr _9 = RBRACE _10 = LBRACE _11 = NOTHING _12 = RARROW _13 = anno_expr _14 = RBRACE
{ ( mk_case_sn _2 _6 _8 _13 )}
| _1 = CASE _2 = anno_expr _3 = OF _4 = LBRACE _5 = NOTHING _6 = RARROW _7 = anno_expr _8 = RBRACE _9 = LBRACE _10 = JUST _11 = id_unknown _12 = RARROW _13 = anno_expr _14 = RBRACE
{ ( mk_case_sn _2 _11 _7 _13 )}
...
...
@@ -794,7 +794,7 @@ case:
{ ( case_error "predicate" )}
letin:
|
_1 = LET _2 = LPAREN _3 = id_list _4 = RPAREN _5 = GETS _6 = anno_expr _7 = IN _8 = anno_expr
_1 = LET _2 = LPAREN _3 = id_list _4 = RPAREN _5 = GETS _6 = anno_expr _7 = IN _8 = anno_expr
{ ( mk_let _3 _6 _8 )}
| _1 = LET _2 = IDENTIFIER _3 = GETS _4 = anno_expr _5 = IN _6 = anno_expr
{ ( mk_let [_2] _4 _6 )}
...
...
@@ -810,7 +810,7 @@ letin:
{ ( print_error "Let binding error" )}
bind:
|
_1 = BIND _2 = anno_expr _3 = AS _4 = IDENTIFIER _5 = IN _6 = anno_expr
_1 = BIND _2 = anno_expr _3 = AS _4 = IDENTIFIER _5 = IN _6 = anno_expr
{ ( mk_bind _2 _4 _6 )}
| _1 = BIND _2 = anno_expr _3 = AS _4 = IDENTIFIER _5 = IN _6 = error
{ ( bind_error "expr" )}
...
...
@@ -824,7 +824,7 @@ bind:
{ ( bind_error "predicate" )}
lambda:
|
_1 = BACKSLASH _2 = arg _3 = RARROW _4 = anno_expr
_1 = BACKSLASH _2 = arg _3 = RARROW _4 = anno_expr
{ ( mkexpr (Lambda(_2)) [_4] )}
| _1 = BACKSLASH _2 = arg _3 = RARROW _4 = error
{ ( lambda_error "body" )}
...
...
@@ -832,11 +832,11 @@ lambda:
{ ( lambda_error "argument" )}
tuple_index:
|
_1 = anno_expr _2 = PERIOD _3 = LBRACKET _4 = INTEGER _5 = RBRACKET
_1 = anno_expr _2 = PERIOD _3 = LBRACKET _4 = INTEGER _5 = RBRACKET
{ ( mkexpr (Subscript _4) [_1] )}
access:
|
_1 = anno_expr _2 = LBRACKET _3 = tuple _4 = RBRACKET
_1 = anno_expr _2 = LBRACKET _3 = tuple _4 = RBRACKET
{ ( mkexpr Slice [_1; _3] )}
| _1 = anno_expr _2 = LBRACKETLT _3 = tuple _4 = RBRACKET
{ ( mkexpr SliceFrontier [_1; _3] )}
...
...
@@ -852,7 +852,7 @@ access:
{ ( mkexpr MinWith [_3; _5; _7] )}
mutation:
|
_1 = INSERT _2 = LPAREN _3 = variable _4 = COMMA _5 = tuple _6 = RPAREN
_1 = INSERT _2 = LPAREN _3 = variable _4 = COMMA _5 = tuple _6 = RPAREN
{ ( mkexpr Insert [mk_var _3; _5] )}
| _1 = UPSERT_WITH _2 = LPAREN _3 = variable _4 = COMMA _5 = LPAREN _6 = tuple _7 = RPAREN _8 = COMMA _9 = anno_expr _10 = COMMA _11 = anno_expr _12 = RPAREN
{ ( mkexpr UpsertWith [mk_var _3; _6; _9; _11] )}
...
...
@@ -892,7 +892,7 @@ mutation:
{ ( assign_error "reference" )}
transformers:
|
_1 = anno_expr _2 = CONCAT _3 = anno_expr
_1 = anno_expr _2 = CONCAT _3 = anno_expr
{ ( mkexpr Combine [_1; _3] )}
| _1 = MAP _2 = LPAREN _3 = anno_expr _4 = COMMA _5 = anno_expr _6 = RPAREN
{ ( mkexpr Map [_3; _5] )}
...
...
@@ -958,17 +958,17 @@ transformers:
{ ( print_error("Invalid groupby syntax") )}
block:
|
_1 = DO _2 = LBRACE _3 = expr_seq _4 = RBRACE
_1 = DO _2 = LBRACE _3 = expr_seq _4 = RBRACE
{ ( mkexpr Block _3 )}
identifier_stream:
|
_1 = IDENTIFIER
_1 = IDENTIFIER
{ ([_1])}
| _1 = IDENTIFIER _2 = identifier_stream
{ ( _1::_2 )}
program_test:
|
_1 = program _2 = EXPECTED _3 = named_expr_list
_1 = program _2 = EXPECTED _3 = named_expr_list
{ ( ProgTest (_1, _3) )}
| _1 = program _2 = NETWORK _3 = EXPECTED _4 = named_expr_list
{ ( NetworkTest (_1, _4) )}
...
...
@@ -980,7 +980,7 @@ program_test:
{ ( print_error "no expected values specified for program test" )}
expression_test_list:
|
_1 = anno_expr _2 = EXPECTED _3 = check_expr
_1 = anno_expr _2 = EXPECTED _3 = check_expr
{ ( [[], _1, _3] )}
| _1 = program _2 = anno_expr _3 = EXPECTED _4 = check_expr
{ ( [_1, _2, _4] )}
...
...
@@ -990,11 +990,11 @@ expression_test_list:
{ ( print_error "invalid expected expression")}
expression_test:
|
_1 = expression_test_list
_1 = expression_test_list
{ ( ExprTest _1 )}
named_expr_list:
|
_1 = anno_expr _2 = GETS _3 = check_expr
_1 = anno_expr _2 = GETS _3 = check_expr
{ ( [_1, _3] )}
| _1 = anno_expr _2 = GETS _3 = check_expr _4 = COMMA _5 = named_expr_list
{ ( _5@[_1, _3] )}
...
...
@@ -1002,7 +1002,7 @@ named_expr_list:
{ ( print_error "invalid check expression")}
check_expr:
|
_1 = IDENTIFIER _2 = COLON _3 = anno_expr
_1 = IDENTIFIER _2 = COLON _3 = anno_expr
{ ( InlineExpr(_1, _3) )}
%%
...
...
bench/good/albatross.opp.exp
View file @
004933c6
...
...
@@ -240,19 +240,19 @@ let predicate_of_expression (info:info) (e:expression): expression =
%%
file:
|
_1 = use_block _2 = optsemi _3 = decls
_1 = use_block _2 = optsemi _3 = decls
{ (_1, List.rev _3)}
| _1 = decls
{ ([], List.rev _1 )}
decls:
|
{ ( [] )}
| _1 = decls _2 = optsemi _3 = decl
{ ( _3::_1 )}
decl:
|
_1 = class_declaration
_1 = class_declaration
{ ( _1 )}
| _1 = named_feature
{ ( _1 )}
...
...
@@ -262,7 +262,7 @@ decl:
{ ( _1 )}
use_block_opt:
|
{ ( [] )}
| _1 = decl
{ ( [] )}
...
...
@@ -270,28 +270,28 @@ use_block_opt:
{ ( _1 )}
use_block:
|
_1 = KWuse _2 = module_list _3 = KWend
_1 = KWuse _2 = module_list _3 = KWend
{ ( List.rev _2 )}
module_list:
|
_1 = one_module
_1 = one_module
{ ( [_1] )}
| _1 = one_module _2 = separator _3 = module_list
{ ( _1 :: _3 )}
one_module:
|
_1 = dotted_id_list
_1 = dotted_id_list
{ (
withinfo (rhs_info 1) (List.hd _1, List.tl _1)
)}
formal_generic:
|
_1 = UIDENTIFIER _2 = COLON _3 = type_nt
_1 = UIDENTIFIER _2 = COLON _3 = type_nt
{ ( Formal_generic (withinfo (rhs_info 1) _1,
withinfo (rhs_info 3) _3) )}
ass_feat:
|
_1 = proof_all_expr
_1 = proof_all_expr
{ (
let entlst, req, impl, ens = _1 in
let bdy = req, Some impl, ens in
...
...
@@ -299,39 +299,39 @@ ass_feat:
)}
ass_req:
|
_1 = KWrequire _2 = ass_seq
_1 = KWrequire _2 = ass_seq
{ ( List.rev _2 )}
| _1 = KWrequire _2 = ass_seq _3 = separator
{ ( List.rev _2 )}
ass_req_opt:
|
{ ( [] )}
| _1 = ass_req
{ ( _1 )}
ass_check:
|
_1 = KWproof _2 = proof_seq _3 = separator
_1 = KWproof _2 = proof_seq _3 = separator
{ ( List.rev _2 )}
ass_ens:
|
_1 = KWensure _2 = ass_seq
_1 = KWensure _2 = ass_seq
{ ( List.rev _2 )}
ass_seq:
|
_1 = info_expr
_1 = info_expr
{ ( [_1] )}
| _1 = ass_seq _2 = separator _3 = info_expr
{ ( _3::_1 )}
proof_seq:
|
_1 = proof_expr
_1 = proof_expr
{ ( [_1] )}
| _1 = proof_seq _2 = separator _3 = proof_expr
{ ( _3::_1 )}
proof_expr:
|
_1 = info_expr
_1 = info_expr
{ ( _1 )}
| _1 = proof_expr_struct
{ ( _1 )}
...
...
@@ -345,21 +345,21 @@ proof_expr:
)}
proof_all_expr:
|
_1 = KWall _2 = formal_arguments_opt _3 = opt_nl _4 = ass_req_opt _5 = ass_imp _6 = ass_ens _7 = KWend
_1 = KWall _2 = formal_arguments_opt _3 = opt_nl _4 = ass_req_opt _5 = ass_imp _6 = ass_ens _7 = KWend
{ (
let entlst = withinfo (rhs_info 2) _2 in
entlst, _4, _5, _6
)}
proof_all_expr_inner:
|
_1 = KWall _2 = formal_arguments _3 = opt_nl _4 = ass_req_opt _5 = ass_imp _6 = ass_ens _7 = KWend
_1 = KWall _2 = formal_arguments _3 = opt_nl _4 = ass_req_opt _5 = ass_imp _6 = ass_ens _7 = KWend
{ (
let entlst = withinfo (rhs_info 2) _2 in
entlst, _4, _5, _6
)}
proof_expr_struct:
|
_1 = ass_req _2 = ass_check _3 = ass_ens _4 = KWend
_1 = ass_req _2 = ass_check _3 = ass_ens _4 = KWend
{ (
let is_do = false in
let impl = Impdefined (None,is_do,_2) in
...
...
@@ -380,7 +380,7 @@ proof_expr_struct:
)}
ass_imp:
|
{ ( Impdefined (None,false,[]) )}
| _1 = ass_check
{ ( Impdefined (None,false,_1) )}
...
...
@@ -395,7 +395,7 @@ ass_imp:
)}
header_mark:
|
{ ( No_hmark )}
| _1 = KWimmutable
{ ( Immutable_hmark )}
...
...
@@ -405,7 +405,7 @@ header_mark:
{ ( Deferred_hmark )}
class_declaration:
|
_1 = header_mark _2 = KWclass _3 = class_name _4 = class_generics _5 = create_clause _6 = inherit_clause _7 = KWend
_1 = header_mark _2 = KWclass _3 = class_name _4 = class_generics _5 = create_clause _6 = inherit_clause _7 = KWend
{ (
Class_declaration( withinfo (rhs_info 3) _1,
withinfo (rhs_info 3) _3,
...
...
@@ -415,51 +415,51 @@ class_declaration:
)}
class_name:
|
_1 = UIDENTIFIER
_1 = UIDENTIFIER
{ ( [], _1 )}
| _1 = path _2 = UIDENTIFIER
{ ( _1, _2 )}
class_generics:
|
{ ( [] )}
| _1 = LBRACKET _2 = uidentifier_list _3 = RBRACKET
{ ( _2 )}
inherit_clause:
|
{ ( [] )}
| _1 = KWinherit _2 = parent_list
{ ( _2 )}
parent_list:
|
_1 = parent
_1 = parent
{ ( [_1] )}
| _1 = parent _2 = optsemi _3 = parent_list
{ ( _1::_3 )}
parent:
|
_1 = optghost _2 = type_nt _3 = feature_adaptation
_1 = optghost _2 = type_nt _3 = feature_adaptation
{ ( _1, withinfo (rhs_info 2) _2, _3 )}
feature_adaptation:
|
{ ( [] )}
| _1 = KWrename _2 = rename_list _3 = KWend
{ ( _2 )}
rename_list:
|
_1 = rename_item
_1 = rename_item
{ ( [_1] )}
| _1 = rename_item _2 = optsemi _3 = rename_list
{ ( _1::_3 )}
rename_item:
|
_1 = name_sig _2 = KWas _3 = nameopconst
_1 = name_sig _2 = KWas _3 = nameopconst
{ ( _1,_3 )}
name_sig:
|
_1 = nameopconst
_1 = nameopconst
{ ( _1,[],None )}
| _1 = nameopconst _2 = LPAREN _3 = type_list _4 = RPAREN
{ ( _1,_3,None )}
...
...
@@ -467,41 +467,41 @@ name_sig:
{ ( _1,_3, Some _6 )}
create_clause:
|
{ ( withinfo UNKNOWN [] )}
| _1 = KWcreate _2 = constructor_list
{ ( withinfo (rhs_info 1) _2 )}
constructor_list:
|
_1 = constructor
_1 = constructor
{ ( [_1] )}
| _1 = constructor _2 = separator _3 = constructor_list
{ ( _1::_3 )}