projects
/
deliverable
/
binutils-gdb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
* target-memory.c (blocks_to_erase): Correct off-by-one error.
[deliverable/binutils-gdb.git]
/
gdb
/
f-exp.y
diff --git
a/gdb/f-exp.y
b/gdb/f-exp.y
index f20a54f4bf107a3565434805fdc4d8cae725d695..f87937373a25e86d175f09b3ee8e3a789d2f65fa 100644
(file)
--- a/
gdb/f-exp.y
+++ b/
gdb/f-exp.y
@@
-1,6
+1,6
@@
/* YACC parser for Fortran expressions, for GDB.
Copyright (C) 1986, 1989, 1990, 1991, 1993, 1994, 1995, 1996, 2000, 2001,
/* YACC parser for Fortran expressions, for GDB.
Copyright (C) 1986, 1989, 1990, 1991, 1993, 1994, 1995, 1996, 2000, 2001,
- 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+ 2002, 2003, 2004, 2005
, 2006, 2007
Free Software Foundation, Inc.
Contributed by Motorola. Adapted from the C parser by Farooq Butt
(fmbutt@engage.sps.mot.com).
Contributed by Motorola. Adapted from the C parser by Farooq Butt
(fmbutt@engage.sps.mot.com).
@@
-178,6
+178,7
@@
static int parse_number (char *, int, int, YYSTYPE *);
%token <lval> BOOLEAN_LITERAL
%token <ssym> NAME
%token <tsym> TYPENAME
%token <lval> BOOLEAN_LITERAL
%token <ssym> NAME
%token <tsym> TYPENAME
+%type <sval> name
%type <ssym> name_not_typename
/* A NAME_OR_INT is a symbol which is not known in the symbol table,
%type <ssym> name_not_typename
/* A NAME_OR_INT is a symbol which is not known in the symbol table,
@@
-217,8
+218,9
@@
static int parse_number (char *, int, int, YYSTYPE *);
%left LSH RSH
%left '@'
%left '+' '-'
%left LSH RSH
%left '@'
%left '+' '-'
-%left '*' '/'
'%'
+%left '*' '/'
%right STARSTAR
%right STARSTAR
+%right '%'
%right UNARY
%right '('
%right UNARY
%right '('
@@
-332,6
+334,12
@@
exp : '(' type ')' exp %prec UNARY
write_exp_elt_opcode (UNOP_CAST); }
;
write_exp_elt_opcode (UNOP_CAST); }
;
+exp : exp '%' name
+ { write_exp_elt_opcode (STRUCTOP_STRUCT);
+ write_exp_string ($3);
+ write_exp_elt_opcode (STRUCTOP_STRUCT); }
+ ;
+
/* Binary operators in order of decreasing precedence. */
exp : exp '@' exp
/* Binary operators in order of decreasing precedence. */
exp : exp '@' exp
@@
-350,10
+358,6
@@
exp : exp '/' exp
{ write_exp_elt_opcode (BINOP_DIV); }
;
{ write_exp_elt_opcode (BINOP_DIV); }
;
-exp : exp '%' exp
- { write_exp_elt_opcode (BINOP_REM); }
- ;
-
exp : exp '+' exp
{ write_exp_elt_opcode (BINOP_ADD); }
;
exp : exp '+' exp
{ write_exp_elt_opcode (BINOP_ADD); }
;
@@
-635,6
+639,10
@@
nonempty_typelist
}
;
}
;
+name : NAME
+ { $$ = $1.stoken; }
+ ;
+
name_not_typename : NAME
/* These would be useful if name_not_typename was useful, but it is just
a fake for "variable", so these cause reduce/reduce conflicts because
name_not_typename : NAME
/* These would be useful if name_not_typename was useful, but it is just
a fake for "variable", so these cause reduce/reduce conflicts because
This page took
0.02417 seconds
and
4
git commands to generate.