* gdb.base/maint.exp: Only dump symbols from one source file
[deliverable/binutils-gdb.git] / gdb / m2-exp.y
index eaaad5a3882a110f43af4cb63ec865f3c0f28d3c..3fb46851c84b424ae88951f9834ca9a9be207fa0 100644 (file)
@@ -87,6 +87,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 #define        yylloc  m2_lloc
 #define        yyreds  m2_reds         /* With YYDEBUG defined */
 #define        yytoks  m2_toks         /* With YYDEBUG defined */
+#define yyname m2_name         /* With YYDEBUG defined */
+#define yyrule m2_rule         /* With YYDEBUG defined */
 #define yylhs  m2_yylhs
 #define yylen  m2_yylen
 #define yydefred m2_yydefred
@@ -98,9 +100,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 #define yycheck         m2_yycheck
 
 #ifndef YYDEBUG
-#define        YYDEBUG 0               /* Default to no yydebug support */
+#define        YYDEBUG 1               /* Default to yydebug support */
 #endif
 
+#define YYFPRINTF parser_fprintf
+
 int yyparse (void);
 
 static int yylex (void);
@@ -212,6 +216,7 @@ type_exp:   type
 
 exp     :       exp '^'   %prec UNARY
                         { write_exp_elt_opcode (UNOP_IND); }
+       ;
 
 exp    :       '-'
                        { number_sign = -1; }
@@ -326,6 +331,7 @@ exp :       INCL '(' exp ',' exp ')'
 
 exp    :       EXCL '(' exp ',' exp ')'
                        { error("Sets are not implemented.");}
+       ;
 
 set    :       '{' arglist '}'
                        { error("Sets are not implemented.");}
@@ -821,6 +827,8 @@ yylex ()
 
  retry:
 
+  prev_lexptr = lexptr;
+
   tokstart = lexptr;
 
 
@@ -1090,5 +1098,8 @@ void
 yyerror (msg)
      char *msg;
 {
+  if (prev_lexptr)
+    lexptr = prev_lexptr;
+
   error ("A %s in expression, near `%s'.", (msg ? msg : "error"), lexptr);
 }
This page took 0.036995 seconds and 4 git commands to generate.