Revision: 1702
Author: sebastien.lelong
Date: Thu Feb 25 03:03:36 2010
Log: fix parsing of const array
http://code.google.com/p/jallib/source/detail?r=1702

Modified:
 /trunk/tools/jallib.py

=======================================
--- /trunk/tools/jallib.py      Mon Feb 22 06:08:10 2010
+++ /trunk/tools/jallib.py      Thu Feb 25 03:03:36 2010
@@ -1142,7 +1142,7 @@
 COMMENT_RE = re.compile("((--)|;).*")

VAR_RE = re.compile("var\s+(volatile\s*)?([%s\*]+)\s+([%s]+)(\s*\[.*\])?\s*=?" % (VALID_IDENTIFIER,VALID_IDENTIFIER),re.IGNORECASE) -CONST_RE = re.compile("const\s+([%s]+\s+)?([%s]+)\s+=" % (VALID_IDENTIFIER,VALID_IDENTIFIER),re.IGNORECASE) +CONST_RE = re.compile("const\s+([%s]+\s+)?([%s]+)\s*(\[.*\])?\s*=" % (VALID_IDENTIFIER,VALID_IDENTIFIER),re.IGNORECASE) ALIAS_RE = re.compile("alias\s+([%s]+)\s+is\s+([%s]+)" % (VALID_IDENTIFIER,VALID_IDENTIFIER),re.IGNORECASE) PROC_RE = re.compile("procedure\s+([%s]+)\s*\((.*)\)\s+is" % VALID_IDENTIFIER,re.IGNORECASE) # FIX: signature can be on multine PSEU_RE = re.compile("(procedure|function)\s+([%s]+)'(put| get)\s*(\(.*\))?\s*(return\s*.*)?\s+is" % VALID_IDENTIFIER,re.IGNORECASE)
@@ -1197,7 +1197,7 @@
                 _,type,name,arr = VAR_RE.match(content).groups()
desc['var'][name] = {'type' : type, 'name' : name, 'line' : num}#, 'content' : content}
             elif CONST_RE.match(content):
-                type, name = CONST_RE.match(content).groups()
+                type,name,arr = CONST_RE.match(content).groups()
desc['const'][name] = {'type' : type, 'name' : name, 'line' : num}#, 'content' : content}
             elif ALIAS_RE.match(content):
                 alias, source = ALIAS_RE.match(content).groups()

--
You received this message because you are subscribed to the Google Groups 
"jallib" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/jallib?hl=en.

Reply via email to