Initial pass at D language expression parser support.

gdb/
2014-06-05  Iain Buclaw  <ibuclaw@gdcproject.org>

	* Makefile.in (SFILES): Add d-exp.y.
	(YYFILES): Add d-exp.c.
	(YYOBJ): Add d-exp.o.
	(local-maintainer-clean): Delete d-exp.c.
	* d-exp.y: New file.
	* d-lang.h (d_parse): New declaration.
	(d_error): New declaration.
	* d-lang.c (d_op_print_tab): Add entry for BINOP_CONCAT and BINOP_EXP.
	Set BINOP_EQUAL and BINOP_NOTEQUAL to same precedence as other
	PREC_ORDER operators.
	(d_language_defn): Use d_parse, d_error instead of c_parse, c_error.

gdb/testsuite/
2014-06-05  Iain Buclaw  <ibuclaw@gdcproject.org>

	* gdb.dlang/expression.exp: New file.
This commit is contained in:
Iain Buclaw
2014-06-19 19:29:26 +01:00
parent 78c164b006
commit 3ed9baed43
7 changed files with 1808 additions and 8 deletions

View File

@@ -54,6 +54,12 @@ struct builtin_d_type
struct type *builtin_dchar;
};
/* Defined in d-exp.y. */
extern int d_parse (struct parser_state *);
extern void d_error (char *);
/* Defined in d-lang.c */
extern const char *d_main_name (void);