diff --git a/mode/awk.py b/mode/awk.py index d343a1b..7a4195a 100644 --- a/mode/awk.py +++ b/mode/awk.py @@ -1,5 +1,5 @@ import commands -import color, mode, tab +import color, method, mode, tab from lex import Grammar, PatternRule, RegionRule from mode.python import StringGrammar2 from tab import StackTabber2 diff --git a/mode/c.py b/mode/c.py index 9239053..f898539 100644 --- a/mode/c.py +++ b/mode/c.py @@ -9,8 +9,6 @@ class CommentGrammar(Grammar): PatternRule(r'data', r'(?:[^\*]|\*(?!/))+'), ] -# this might not be complete... -# see http://gcc.gnu.org/onlinedocs/gcc-2.95.3/cpp_3.html#SEC44 class MacroGrammar(Grammar): rules = [ PatternRule(r'spaces', r' +'), @@ -48,7 +46,7 @@ class CGrammar(Grammar): PatternRule(r'builtin', r"(?:NULL|TRUE|FALSE)"), PatternRule(r'label', r'[a-zA-Z_][a-zA-Z0-9_]*(?=:)'), - RegionRule(r'macro', r'# *(?:assert|cpu|define|elif|else|endif|error|ident|ifdef|ifndef|if|import|include_next|line|machine|pragma|pragma_once|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$'), RegionRule(r'comment', r'/\*', CommentGrammar, r'\*/'), PatternRule(r'comment', r'//.*$'),