Skip to content
Snippets Groups Projects
Commit c127cf2b authored by Erwan Jahier's avatar Erwan Jahier
Browse files

Move a pragma in the parser (to fix nonreg tests).

parent a1cc31c9
No related branches found
No related tags found
No related merge requests found
......@@ -817,12 +817,12 @@ sxNodeDecl:
;
sxLocalNode:
TK_NODE sxIdent sxStaticParams sxParams TK_RETURNS sxParams sxOptSemicol
sxPragma sxLocals sxBody sxOptEndNode
{ treat_node_decl true $2 $3 $4 $6 $9 $8 (fst $10) (snd $10) }
| TK_FUNCTION sxIdent sxStaticParams sxParams TK_RETURNS sxParams sxOptSemicol
sxPragma sxLocals sxBody sxOptEndNode
{ treat_node_decl false $2 $3 $4 $6 $9 $8 (fst $10) (snd $10) }
TK_NODE sxIdent sxStaticParams sxParams TK_RETURNS sxParams sxPragma sxOptSemicol
sxLocals sxBody sxOptEndNode
{ treat_node_decl true $2 $3 $4 $6 $9 $7 (fst $10) (snd $10) }
| TK_FUNCTION sxIdent sxStaticParams sxParams TK_RETURNS sxParams sxPragma sxOptSemicol
sxLocals sxBody sxOptEndNode
{ treat_node_decl false $2 $3 $4 $6 $9 $7 (fst $10) (snd $10) }
| TK_NODE sxIdent sxStaticParams sxNodeProfileOpt TK_EQ sxEffectiveNode
sxOptSemicol
{ treat_node_alias true $2 $3 $4 $6 }
......
package util
provides node igt(i, j: int) returns (res: bool);
body
node igt(i, j: int) returns (res: bool);
let
res = i > j;
tel
end
--package intArray is packageTableau(int, 10, equals, gt);
--package intArray is packageTableau(int, 10, Lustre::eq, Lustre::igt);
--package intArray is packageTableau(int, 10, =, Lustre::igt);
package intArray is packageTableau(int, 10, =, >);
package intArray is packageTableau(int, 10, =, util::igt);
package main
uses intArray;--, intArray2, intArray3;
......
......@@ -6448,7 +6448,7 @@ tel
----------------------------------------------------------------------
====> ../lus2lic -vl 3 --compile-all-items should_work/demo/Gyroscope2.lus
Opening file should_work/demo/Gyroscope2.lus
*** Error in file "should_work/demo/Gyroscope2.lus", line 107, col 27 to 27, token ';': syntax error
*** Error in file "should_work/demo/Gyroscope2.lus", line 129, col 14 to 14, token '{': syntax error
----------------------------------------------------------------------
......@@ -9930,7 +9930,7 @@ tel
----------------------------------------------------------------------
====> ../lus2lic -vl 3 --compile-all-items should_work/lionel/Gyroscope.lus
Opening file should_work/lionel/Gyroscope.lus
*** Error in file "should_work/lionel/Gyroscope.lus", line 49, col 25 to 25, token ';': syntax error
*** Error in file "should_work/lionel/Gyroscope.lus", line 128, col 17 to 17, token '{': syntax error
----------------------------------------------------------------------
......@@ -12242,8 +12242,10 @@ Opening file should_work/packEnvTest/contractForElementSelectionInArray/main.lus
*** SyntaxTab.create pass 2
init pack main
export node main
init pack util
export node igt
init pack intArray
*** Error in file "should_work/packEnvTest/contractForElementSelectionInArray/main.lus", line 7, col 9 to 16, token 'intArray': bad pack instance: model packageTableau undeclared
*** Error in file "should_work/packEnvTest/contractForElementSelectionInArray/main.lus", line 15, col 9 to 16, token 'intArray': bad pack instance: model packageTableau undeclared
----------------------------------------------------------------------
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment