I am using seq-2.0.11 and base-3.14.8.2. The problem is that the SNL
compiler complains about a syntax error when trying to compile this code:
program dynamic
string sysName;
assign sysName to {};
ss dyn {
state dummy {
when () {
} state dummy
}
}
The message is:
preprocessing ../dynamic.st
converting dynamic.i
syntax error: line no. 3 (../dynamic.st)
definitions/declarations
Note that this is a stripped-down version of some (supposedly valid) example
code from the manual, specifically the example on page 25. I also tried the
new version 2.0.12 but the error is the same.
(BTW: why is the new version not mentioned on the slac page
(http://www.slac.stanford.edu/comp/unix/package/epics/sequencer/)? Slac no
longer maintains it?)
A quick look at the sources reveales that indeed the parser does not accept
an empty list of assignments. This is easily fixed, see attached patch file
which is against version 2.0.12.
Cheers
Ben
--
"Programming = Mathematics + Murphy's Law" (E.W.Dijkstra)
diff -rN -u old-sncseq-2.0.12/src/snc/snc.y new-sncseq-2.0.12/src/snc/snc.y
--- old-sncseq-2.0.12/src/snc/snc.y 2008-11-14 13:37:39.852664073 +0100
+++ new-sncseq-2.0.12/src/snc/snc.y 2008-11-14 13:37:40.176620220 +0100
@@ -145,6 +145,8 @@
/* assign <var name>[<n>] [to] <db name>; */
| ASSIGN NAME subscript to STRING SEMI_COLON { assign_subscr($2, $3, $5); }
/* assign <var name> [to] {<db name>, ... }; */
+| ASSIGN NAME to L_BRACKET R_BRACKET SEMI_COLON
+ { assign_list($2, 0); }
| ASSIGN NAME to L_BRACKET assign_list R_BRACKET SEMI_COLON
{ assign_list($2, $5); }
;
- Replies:
- Re: SNL compiler bug (and a fix) Andrew Johnson
- Navigate by Date:
- Prev:
Re: WireSet missing with 3.14.10 Dehong Zhang
- Next:
Re: USE of CA lib: problem using ca_array_put_callback with strings haquin
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
<2008>
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
Re: USE of CA lib: problem using ca_array_put_callback with strings haquin
- Next:
Re: SNL compiler bug (and a fix) Andrew Johnson
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
<2008>
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
|