diff options
| author | Linus Torvalds <torvalds@home.transmeta.com> | 2003-03-16 22:28:21 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-07 20:59:20 -0700 |
| commit | 5196e756b49cb2c43f8aac12e835fd204473cf12 (patch) | |
| tree | faded13abc8c39ebe3ba2da8bc839b8e3a3031d2 /parse.h | |
| parent | 384be0b5bfe426bb3d2efc8b18f0fb8e3de7b098 (diff) | |
| download | sparse-dev-5196e756b49cb2c43f8aac12e835fd204473cf12.tar.gz | |
Fix cast parsing. Add parsing of gcc typeof/attribute stuff. Parse the
conditional expression ( x ? y : z ) and gcc statement expressions. Fix
complex typenames. Add some rudimentary parsing of inline asms.
This parses most of a kernel "sched.c" with all header files. It still gets
some declarations wrong, though (in particular, it accepts type specifiers
in the pointer declaration that should only accept type _qualifiers_).
Diffstat (limited to 'parse.h')
| -rw-r--r-- | parse.h | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -11,6 +11,8 @@ enum expression_type { EXPR_POSTOP, EXPR_CAST, EXPR_SIZEOF, + EXPR_CONDITIONAL, + EXPR_STATEMENT, }; struct expression { @@ -18,6 +20,7 @@ struct expression { struct token *token; union { struct expression *unop; + struct statement *statement; struct binop_arg { struct expression *left, *right; }; @@ -29,6 +32,13 @@ struct expression { struct symbol *cast_type; struct expression *cast_expression; }; + struct conditional_expr { + struct expression *conditional, *cond_true, *cond_false; + }; + struct statement_struct { + struct symbol_list *syms; + struct statement_list *stmts; + }; }; }; @@ -47,6 +57,7 @@ enum statement_type { STMT_DO, STMT_LABEL, STMT_GOTO, + STMT_ASM, }; struct statement { |
