Skip to content
This repository has been archived by the owner on Aug 29, 2020. It is now read-only.

Commit

Permalink
Fix parse error with MAD-X ARRAYs
Browse files Browse the repository at this point in the history
  • Loading branch information
coldfix committed Apr 29, 2014
1 parent 58777c4 commit 46fc609
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion madseq.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,8 @@ class regex(object):
thingy = Re(r'(?:[^\s,;!]+)')
identifier = Re(r'(?:[a-zA-Z][\w\.]*)')
string = Re(r'(?:"[^"]*")')
param = Re(r'(?:',string,'|',thingy,')')
array = Re(r'(?:\{[^\}]*\})')
param = Re(r'(?:',string,'|',array,'|',thingy,')')
cmd = Re(r'^\s*(?:(',identifier,r')\s*:)?\s*(',identifier,r')\s*(,.*)?;\s*$')
arg = Re(r',\s*(',identifier,r')\s*(:?=)\s*(',param,')')

Expand Down

0 comments on commit 46fc609

Please sign in to comment.