constant bug fix

--HG--
branch : pmacs2
This commit is contained in:
moculus 2009-03-26 02:50:45 +00:00
parent a108be50c7
commit a6adf2006e
1 changed files with 1 additions and 1 deletions

View File

@ -57,7 +57,7 @@ class CGrammar(Grammar):
r'identifier', r'[a-zA-Z_][a-zA-Z0-9_]*'), r'identifier', r'[a-zA-Z_][a-zA-Z0-9_]*'),
PatternRule(r'function', r'[a-zA-Z_][a-zA-Z0-9_]*(?= *\()'), PatternRule(r'function', r'[a-zA-Z_][a-zA-Z0-9_]*(?= *\()'),
PatternRule(r'constant', r"[A-Z_][A-Z0-9_]+"), PatternRule(r'constant', r"[A-Z_][A-Z0-9_]+(?![a-zA-Z0-9_])"),
PatternRule(r'label', r'[a-zA-Z_][a-zA-Z0-9_]*(?=:)'), PatternRule(r'label', r'[a-zA-Z_][a-zA-Z0-9_]*(?=:)'),
RegionRule(r'error', r'# *error', ErrorGrammar, r'\n$'), RegionRule(r'error', r'# *error', ErrorGrammar, r'\n$'),
RegionRule(r'macro', r'# *(?:assert|cpu|define|elif|else|endif|error|ident|ifdef|ifndef|if|import|include_next|line|machine|pragma_once|pragma|system|unassert|undef|warning)(?!=[a-zA-Z0-9_])', MacroGrammar, r'\n$'), RegionRule(r'macro', r'# *(?:assert|cpu|define|elif|else|endif|error|ident|ifdef|ifndef|if|import|include_next|line|machine|pragma_once|pragma|system|unassert|undef|warning)(?!=[a-zA-Z0-9_])', MacroGrammar, r'\n$'),