Commit 422d9921 by Nathan Sidwell Committed by Nathan Sidwell

gengtype-lex.l: Add commented } & ) characters to unconfuse editor's paren matching.

	* gengtype-lex.l: Add commented } & ) characters to unconfuse
	editor's paren matching. Allow #define inside a struct.

From-SVN: r88873
parent e55096f0
2004-10-11 Nathan Sidwell <nathan@codesourcery.com>
* gengtype-lex.l: Add commented } & ) characters to unconfuse
editor's paren matching. Allow #define inside a struct.
2004-10-10 Andrew Pinski <pinskia@physics.uc.edu>
PR middle-end/17703
......
......@@ -270,7 +270,7 @@ ITYPE {IWORD}({WS}{IWORD})*
"/*" { BEGIN(in_struct_comment); }
^"%{" { BEGIN(in_yacc_escape); }
^"%{" { BEGIN(in_yacc_escape); } /* } */
^"@@".* /* Used for c-parse.in C/ObjC demarcation. */
......@@ -307,7 +307,7 @@ ITYPE {IWORD}({WS}{IWORD})*
char *ptr = yytext;
macro = ptr;
while (*ptr != '(' && !ISSPACE (*ptr))
while (*ptr != '(' && !ISSPACE (*ptr)) /* )*/
ptr++;
macro_len = ptr - macro;
while (*ptr == '(' || ISSPACE (*ptr))
......@@ -361,6 +361,8 @@ ITYPE {IWORD}({WS}{IWORD})*
return PERCENTPERCENT;
}
"#define"[^\n]*\n {lexer_line.line++;}
. {
error_at_line (&lexer_line, "unexpected character `%s'", yytext);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment