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

Change the priority of TK_impk to parse expressions like "ok = x=1 => true;".

parent 65695130
No related branches found
No related tags found
No related merge requests found
......@@ -3,7 +3,7 @@
LIC2CDIR=~/lic2loc
LUS2LICDIR=~/lus2lic
LUS2LIC=$(LUS2LICDIR)/src/lus2lic
WWW_DIR=/usr/local/www/DIST-TOOLS/SYNCHRONE/lustre-v6
WWW_DIR=/import/www/DIST-TOOLS/SYNCHRONE/lustre-v6
ifeq ($(HOSTTYPE),cygwin)
WWW_DIR=//ARPONT/www-verimag/DIST-TOOLS/SYNCHRONE/lustre-v6
......
OCAMLMAKEFILE = ./OCamlMakefile
RESULT=lus2lic
RESULT=lus2lic$(EXE)
LIBS = str unix
......
......@@ -110,9 +110,10 @@ open ParserUtils
%left TK_ARROW
%nonassoc TK_STEP
%nonassoc TK_CDOTS
%right TK_IMPL
%left TK_OR TK_XOR
%left TK_AND
%nonassoc TK_LT TK_LTE TK_EQ TK_GTE TK_GT TK_NEQ TK_IMPL
%nonassoc TK_LT TK_LTE TK_EQ TK_GTE TK_GT TK_NEQ
%nonassoc TK_NOT
%left TK_PLUS TK_MINUS
%left TK_STAR TK_SLASH TK_PCENT TK_MOD TK_DIV
......
node test_impl_prio(x: int) returns (ok: bool)
let
ok = x=1 => true;
tel
......@@ -3317,6 +3317,19 @@ type A_A_A_int_4_4_4 = A_A_int_4_4^4;
type A_A_int_4_4 = A_int_4^4;
type A_int_4 = int^4;
----------------------------------------------------------------------
====> ../lus2lic -vl 2 --nonreg-test should_work/NONREG/impl_priority.lus
-- ../lus2lic -vl 2 --nonreg-test should_work/NONREG/impl_priority.lus
node impl_priority::test_impl_prio(x:int) returns (ok:bool);
var
_v_1:bool;
let
ok = _v_1 => true;
_v_1 = x = 1;
tel
-- end of node impl_priority::test_impl_prio
----------------------------------------------------------------------
====> ../lus2lic -vl 2 --nonreg-test should_work/NONREG/import1.lus
-- ../lus2lic -vl 2 --nonreg-test should_work/NONREG/import1.lus
......
......@@ -233,6 +233,10 @@ ec2c /tmp/xx.ec
====> ../lus2lic --nonreg-test -ec should_work/NONREG/hanane.lus -o /tmp/xx.ec
ec2c /tmp/xx.ec
----------------------------------------------------------------------
====> ../lus2lic --nonreg-test -ec should_work/NONREG/impl_priority.lus -o /tmp/xx.ec
ec2c /tmp/xx.ec
----------------------------------------------------------------------
====> ../lus2lic --nonreg-test -ec should_work/NONREG/import1.lus -o /tmp/xx.ec
ec2c /tmp/xx.ec
......
......@@ -334,6 +334,11 @@ lus2ec /tmp/xx.lus fresh_name__fn
lus2ec /tmp/xx.lus hanane__hanane
--Pollux Version 2.3a
----------------------------------------------------------------------
====> ../lus2lic --nonreg-test -lv4 should_work/NONREG/impl_priority.lus -o /tmp/xx.lus
lus2ec /tmp/xx.lus impl_priority__test_impl_prio
--Pollux Version 2.3a
----------------------------------------------------------------------
====> ../lus2lic --nonreg-test -lv4 should_work/NONREG/import1.lus -o /tmp/xx.lus
lus2ec /tmp/xx.lus import1__import1
......
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