* gdbtypes.h (builtin_type_void): Remove macro, add declaration.
[deliverable/binutils-gdb.git] / ld / ldlex.l
index 10339dd1779f842d76334df965a4f34c47368b35..aa06d5460d9835a5c2dcf5189539d20d60aa5793 100644 (file)
@@ -1,35 +1,29 @@
 %{
 
 /* Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-   2000, 2001, 2002, 2003, 2004, 2005  Free Software Foundation, Inc.
+   2000, 2001, 2002, 2003, 2004, 2005, 2007
+   Free Software Foundation, Inc.
+   Written by Steve Chamberlain of Cygnus Support.
 
-   This file is part of GLD, the Gnu Linker.
+   This file is part of the GNU Binutils.
 
-   GLD is free software; you can redistribute it and/or modify
+   This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2, or (at your option)
-   any later version.
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
 
-   GLD is distributed in the hope that it will be useful,
+   This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.
 
    You should have received a copy of the GNU General Public License
-   along with GLD; see the file COPYING.  If not, write to the Free
-   Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
-   02110-1301, USA.  */
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
+   MA 02110-1301, USA.  */
 
-/*
-This was written by steve chamberlain
-                    sac@cygnus.com
-*/
-
-
-#include <stdio.h>
-
-#include "bfd.h"
 #include "sysdep.h"
+#include "bfd.h"
 #include "safe-ctype.h"
 #include "bfdlink.h"
 #include "ld.h"
@@ -132,6 +126,7 @@ V_IDENTIFIER [*?.$_a-zA-Z\[\]\-\!\^\\]([*?.$_a-zA-Z0-9\[\]\-\!\^\\]|::)*
        case input_script: return INPUT_SCRIPT; break;
        case input_mri_script: return INPUT_MRI_SCRIPT; break;
        case input_version_script: return INPUT_VERSION_SCRIPT; break;
+       case input_dynamic_list: return INPUT_DYNAMIC_LIST; break;
        case input_defsym: return INPUT_DEFSYM; break;
        default: abort ();
        }
@@ -255,9 +250,10 @@ V_IDENTIFIER [*?.$_a-zA-Z\[\]\-\!\^\\]([*?.$_a-zA-Z0-9\[\]\-\!\^\\]|::)*
 <EXPRESSION,BOTH,SCRIPT>"DATA_SEGMENT_END"     { RTOKEN(DATA_SEGMENT_END);}
 <EXPRESSION,BOTH,SCRIPT>"ADDR"         { RTOKEN(ADDR);}
 <EXPRESSION,BOTH,SCRIPT>"LOADADDR"     { RTOKEN(LOADADDR);}
+<EXPRESSION,BOTH,SCRIPT>"ALIGNOF"      { RTOKEN(ALIGNOF); }
 <EXPRESSION,BOTH>"MAX"                 { RTOKEN(MAX_K); }
 <EXPRESSION,BOTH>"MIN"                 { RTOKEN(MIN_K); }
-<EXPRESSION,BOTH>"ASSERT"              { RTOKEN(ASSERT_K); }
+<EXPRESSION,BOTH,SCRIPT>"ASSERT"       { RTOKEN(ASSERT_K); }
 <BOTH,SCRIPT>"ENTRY"                   { RTOKEN(ENTRY);}
 <BOTH,SCRIPT,MRI>"EXTERN"              { RTOKEN(EXTERN);}
 <EXPRESSION,BOTH,SCRIPT>"NEXT"         { RTOKEN(NEXT);}
@@ -278,6 +274,9 @@ V_IDENTIFIER [*?.$_a-zA-Z\[\]\-\!\^\\]([*?.$_a-zA-Z0-9\[\]\-\!\^\\]|::)*
 <BOTH,SCRIPT>"FORCE_COMMON_ALLOCATION" { RTOKEN(FORCE_COMMON_ALLOCATION);}
 <BOTH,SCRIPT>"INHIBIT_COMMON_ALLOCATION" { RTOKEN(INHIBIT_COMMON_ALLOCATION);}
 <BOTH,SCRIPT>"SECTIONS"                        { RTOKEN(SECTIONS);}
+<BOTH,SCRIPT>"INSERT"                  { RTOKEN(INSERT_K);}
+<BOTH,SCRIPT>"AFTER"                   { RTOKEN(AFTER);}
+<BOTH,SCRIPT>"BEFORE"                  { RTOKEN(BEFORE);}
 <BOTH,SCRIPT>"FILL"                    { RTOKEN(FILL);}
 <BOTH,SCRIPT>"STARTUP"                 { RTOKEN(STARTUP);}
 <BOTH,SCRIPT>"OUTPUT_FORMAT"           { RTOKEN(OUTPUT_FORMAT);}
@@ -308,7 +307,7 @@ V_IDENTIFIER [*?.$_a-zA-Z\[\]\-\!\^\\]([*?.$_a-zA-Z0-9\[\]\-\!\^\\]|::)*
 <BOTH,SCRIPT>"org"                     { RTOKEN(ORIGIN);}
 <BOTH,SCRIPT>"l"                       { RTOKEN( LENGTH);}
 <BOTH,SCRIPT>"len"                     { RTOKEN( LENGTH);}
-<BOTH,SCRIPT>"INCLUDE"                 { RTOKEN(INCLUDE);}
+<EXPRESSION,BOTH,SCRIPT>"INCLUDE"      { RTOKEN(INCLUDE);}
 <BOTH,SCRIPT>"PHDRS"                   { RTOKEN (PHDRS); }
 <EXPRESSION,BOTH,SCRIPT>"AT"           { RTOKEN(AT);}
 <EXPRESSION,BOTH,SCRIPT>"SUBALIGN"     { RTOKEN(SUBALIGN);}
@@ -364,11 +363,19 @@ V_IDENTIFIER [*?.$_a-zA-Z\[\]\-\!\^\\]([*?.$_a-zA-Z0-9\[\]\-\!\^\\]|::)*
                                }
 
 
-<BOTH,EXPRESSION>{FILENAMECHAR1}{FILENAMECHAR}*        {
+<BOTH>{FILENAMECHAR1}{FILENAMECHAR}*   {
+                                yylval.name = xstrdup (yytext);
+                                 return NAME;
+                               }
+<BOTH>"-l"{FILENAMECHAR}+ {
+                                 yylval.name = xstrdup (yytext + 2);
+                                 return LNAME;
+                               }
+<EXPRESSION>{FILENAMECHAR1}{NOCFILENAMECHAR}*  {
                                 yylval.name = xstrdup (yytext);
                                  return NAME;
                                }
-<BOTH,EXPRESSION>"-l"{FILENAMECHAR}+ {
+<EXPRESSION>"-l"{NOCFILENAMECHAR}+ {
                                  yylval.name = xstrdup (yytext + 2);
                                  return LNAME;
                                }
This page took 0.024288 seconds and 4 git commands to generate.