summaryrefslogtreecommitdiff
path: root/gold/yyscript.y
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@google.com>2008-01-23 19:31:56 +0000
committerIan Lance Taylor <iant@google.com>2008-01-23 19:31:56 +0000
commite4967d85cbcaece8748a73d3b34c63f8d989e655 (patch)
treebeec5ecc7f894ae83470e4d9a42ba81047559809 /gold/yyscript.y
parent599121aa77fb254f0e96538de58619cf6415baed (diff)
downloadbinutils-gdb-e4967d85cbcaece8748a73d3b34c63f8d989e655.tar.gz
Use string instead of STRING, so that we handled QUOTED_STRING.
Diffstat (limited to 'gold/yyscript.y')
-rw-r--r--gold/yyscript.y22
1 files changed, 10 insertions, 12 deletions
diff --git a/gold/yyscript.y b/gold/yyscript.y
index dfba25f966e..33023dc52be 100644
--- a/gold/yyscript.y
+++ b/gold/yyscript.y
@@ -276,7 +276,7 @@ sections_block:
/* A command which may appear within a SECTIONS block. */
section_block_cmd:
file_or_sections_cmd
- | STRING section_header
+ | string section_header
{ script_start_output_section(closure, $1.value, $1.length, &$2); }
'{' section_cmds '}' section_trailer
{ script_finish_output_section(closure, &$7); }
@@ -309,7 +309,7 @@ opt_address_and_section_type:
{ $$ = $1; }
| exp '(' ')' ':'
{ $$ = $1; }
- | exp '(' STRING ')' ':'
+ | exp '(' string ')' ':'
{
yyerror(closure, "section types are not supported");
$$ = $1;
@@ -352,21 +352,21 @@ section_trailer:
/* A memory specification for an output section. */
opt_memspec:
- '>' STRING
+ '>' string
{ yyerror(closure, "memory regions are not supported"); }
| /* empty */
;
/* A memory specification for where to load an output section. */
opt_at_memspec:
- AT '>' STRING
+ AT '>' string
{ yyerror(closure, "memory regions are not supported"); }
| /* empty */
;
/* The program segment an output section should go into. */
opt_phdr:
- opt_phdr ':' STRING
+ opt_phdr ':' string
{ yyerror(closure, "program headers are not supported"); }
| /* empty */
;
@@ -393,7 +393,7 @@ section_cmd:
| input_section_spec
| data_length '(' parse_exp ')'
{ script_add_data(closure, $1, $3); }
- | ASSERT_K '(' parse_exp ',' STRING ')'
+ | ASSERT_K '(' parse_exp ',' string ')'
{ script_add_assertion(closure, $3, $5.value, $5.length); }
| FILL '(' parse_exp ')'
{ script_add_fill(closure, $3); }
@@ -433,7 +433,7 @@ input_section_spec:
/* An input section specification within a KEEP clause. */
input_section_no_keep:
- STRING
+ string
{
$$.file.name = $1;
$$.file.sort = SORT_WILDCARD_NONE;
@@ -543,7 +543,7 @@ exclude_names:
/* A single wildcard name. We recognize '*' and '?' specially since
they are expression tokens. */
wildcard_name:
- STRING
+ string
{ $$ = $1; }
| '*'
{
@@ -563,7 +563,7 @@ file_or_sections_cmd:
ENTRY '(' string ')'
{ script_set_entry(closure, $3.value, $3.length); }
| assignment end
- | ASSERT_K '(' parse_exp ',' STRING ')'
+ | ASSERT_K '(' parse_exp ',' string ')'
{ script_add_assertion(closure, $3, $5.value, $5.length); }
;
@@ -687,9 +687,7 @@ exp:
{ $$ = script_exp_trinary_cond($1, $3, $5); }
| INTEGER
{ $$ = script_exp_integer($1); }
- | STRING
- { $$ = script_exp_string($1.value, $1.length); }
- | QUOTED_STRING
+ | string
{ $$ = script_exp_string($1.value, $1.length); }
| MAX_K '(' exp ',' exp ')'
{ $$ = script_exp_function_max($3, $5); }