aboutsummaryrefslogtreecommitdiff
path: root/gdb/cli/cli-cmds.c
diff options
context:
space:
mode:
authorIain Buclaw <ibuclaw@gdcproject.org>2015-08-13 21:35:09 +0200
committerIain Buclaw <ibuclaw@gdcproject.org>2015-08-13 21:48:06 +0200
commit444c1ed8915961384af694249701fa7896e11da8 (patch)
tree58bbf12b485f053d76655ef0f0af309c95b93e6c /gdb/cli/cli-cmds.c
parentbc7c9fab612d4d33f7fe5d17eef4f5bd5cdc4144 (diff)
downloadbinutils-444c1ed8915961384af694249701fa7896e11da8.zip
binutils-444c1ed8915961384af694249701fa7896e11da8.tar.gz
binutils-444c1ed8915961384af694249701fa7896e11da8.tar.bz2
[D] Move classification of symbols from the grammar to the lexer.
This makes it so that alternating '.' and identifier tokens are resolved to symbols as early as possible, which should all the addition of D properties - such as EXP.sizeof and EXP.typeof - without the shift/reduce conflicts that would occur in the current parsing strategy. gdb/ChangeLog * d-exp.y (%union): Add voidval. (%token): Add UNKNOWN_NAME as a token to represent an unclassified name in the lexing stage. (PostfixExpression): Move symbol completion handling in grammar here from PrimaryExpression. (PrimaryExpression): Move routines to handle resolving identifier tokens in the grammar here from push_expression_name. (IdentifierExp): Remove the handling of alternating '.' and identifier tokens. (TypeExp): Allow TypeExp to be wrapped in parenthesis in the grammar. (BasicType): Remove C-style typename rules. (d_type_from_name, d_module_from_name, push_variable) (push_fieldnames, push_type_name, push_module_name) (push_expression_name): Remove. (lex_one_token): Rename from yylex. Replace pstate with par_state. (token_and_value): New type. (token_fifo, popping, name_obstack): New globals. (classify_name): New function. (classify_inner_name): Likewise. (yylex): Likewise. (d_parse): Initialize token_fifo, popping and name_obstack.
Diffstat (limited to 'gdb/cli/cli-cmds.c')
0 files changed, 0 insertions, 0 deletions