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
This commit is contained in:
Nathan Sidwell 2004-10-11 08:55:23 +00:00 committed by Nathan Sidwell
parent e55096f0ce
commit 422d9921d8
2 changed files with 9 additions and 2 deletions

View File

@ -1,3 +1,8 @@
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

View File

@ -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);
}