diff --git a/smop/Makefile b/smop/Makefile index b914a571..9923eed4 100644 --- a/smop/Makefile +++ b/smop/Makefile @@ -3,7 +3,7 @@ OCTAVE = ~/octave-3.8.2/scripts CYTHON = cython PYTHON = python -FLAGS = --syntax-errors=stft.m +FLAGS = -S stft.m -X orderfields.m,legend.m V = 2.7 go_so: solver.so diff --git a/smop/parse.py b/smop/parse.py index 3c52ae6b..19b13231 100644 --- a/smop/parse.py +++ b/smop/parse.py @@ -158,13 +158,17 @@ def p_command(p): p[0] = node.funcall(p[1],p[2]) #################### +def p_init_opt(p): + """init_opt : + | EQ expr + """ def p_global_list(p): - """global_list : ident - | global_list ident + """global_list : ident init_opt + | global_list ident init_opt """ - if len(p) == 2: + if len(p) == 3: p[0] = node.global_list([p[1]]) - elif len(p) == 3: + elif len(p) == 4: p[0] = p[1] p[0].append(p[2])