From: Gabe Black Date: Thu, 31 May 2007 20:45:05 +0000 (+0000) Subject: Handle comments X-Git-Tag: m5_2.0_beta4~392 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ace2890f9fd10fb8b19004b80befc1c9d0948246;p=gem5.git Handle comments --HG-- extra : convert_revision : 3f93baaf250922eb40d8718e978273b0def1e4dd --- diff --git a/src/arch/micro_asm.py b/src/arch/micro_asm.py index 3d9e83648..1fb04c185 100644 --- a/src/arch/micro_asm.py +++ b/src/arch/micro_asm.py @@ -174,7 +174,6 @@ tokens = reserved + ( 'LPAREN', 'RPAREN', 'LBRACE', 'RBRACE', - #'COMMA', 'COLON', 'SEMI', 'DOT', 'NEWLINE' ) @@ -190,62 +189,79 @@ reserved_map = { } for r in reserved: reserved_map[r.lower()] = r +def t_ANY_COMMENT(t): + r'\#[^\n]*(?=\n)' + #print "t_ANY_COMMENT %s" % t.value + +def t_ANY_MULTILINECOMMENT(t): + r'/\*([^/]|((?