projects
/
cparser
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
9d562f8
)
Parse the unlikely case, that someone writes "variable * ..." at the beginning of...
author
Christoph Mallon
<christoph.mallon@gmx.de>
Mon, 15 Sep 2008 09:15:06 +0000
(09:15 +0000)
committer
Christoph Mallon
<christoph.mallon@gmx.de>
Mon, 15 Sep 2008 09:15:06 +0000
(09:15 +0000)
[r21961]
parser.c
patch
|
blob
|
history
diff --git
a/parser.c
b/parser.c
index
a4a016a
..
7b21630
100644
(file)
--- a/
parser.c
+++ b/
parser.c
@@
-9480,13
+9480,18
@@
static statement_t *intern_parse_statement(void)
} else if (is_typedef_symbol(token.v.symbol)) {
statement = parse_declaration_statement();
} else switch (la1_type) {
} else if (is_typedef_symbol(token.v.symbol)) {
statement = parse_declaration_statement();
} else switch (la1_type) {
+ case '*':
+ if (get_declaration(token.v.symbol, NAMESPACE_NORMAL) != NULL)
+ goto expression_statment;
+ /* FALLTHROUGH */
+
DECLARATION_START
case T_IDENTIFIER:
DECLARATION_START
case T_IDENTIFIER:
- case '*':
statement = parse_declaration_statement();
break;
default:
statement = parse_declaration_statement();
break;
default:
+expression_statment:
statement = parse_expression_statement();
break;
}
statement = parse_expression_statement();
break;
}