VirtualBox

Changeset 1217 in kBuild for trunk/src/kash/arith_lex.l


Ignore:
Timestamp:
Oct 7, 2007 9:47:15 PM (17 years ago)
Author:
bird
Message:

make more build...

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kash/arith_lex.l

    r809 r1217  
    3535 */
    3636
    37 #ifdef HAVE_SYS_CDEFS_H
    38 #include <sys/cdefs.h>
    39 #endif
     37#if 0
    4038#ifndef lint
    41 #if 0
    4239static char sccsid[] = "@(#)arith_lex.l 8.3 (Berkeley) 5/4/95";
    4340#else
    4441__RCSID("$NetBSD: arith_lex.l,v 1.13 2005/03/21 22:37:09 dsl Exp $");
     42#endif /* not lint */
    4543#endif
    46 #endif /* not lint */
    4744
    48 #include <unistd.h>
    4945#include "arith.h"
    5046#include "error.h"
    5147#include "expand.h"
    5248#include "var.h"
     49#include "shinstance.h"
    5350
    5451extern int yylval;
     52extern shinstance *arith_psh;
    5553extern char *arith_buf, *arith_startbuf;
    5654#undef YY_INPUT
     
    65630[0-7]*         { yylval = strtol(yytext, 0, 0); return(ARITH_NUM); }
    6664[1-9][0-9]*     { yylval = strtol(yytext, 0, 0); return(ARITH_NUM); }
    67 [A-Za-z_][A-Za-z_0-9]*  { char *v = lookupvar(yytext);
     65[A-Za-z_][A-Za-z_0-9]*  { char *v = lookupvar(arith_psh, yytext);
    6866                        if (v) {
    6967                                yylval = strtol(v, &v, 0);
     
    7169                                        return ARITH_NUM;
    7270                        }
    73                         error("arith: syntax error: \"%s\"", arith_startbuf);
     71                        error(arith_psh, "arith: syntax error: \"%s\"", arith_startbuf);
    7472                }
    7573"("     { return(ARITH_LPAREN); }
     
    9593"~"     { return(ARITH_BNOT); }
    9694"!"     { return(ARITH_NOT); }
    97 .       { error("arith: syntax error: \"%s\"", arith_startbuf); }
     95.       { error(arith_psh, "arith: syntax error: \"%s\"", arith_startbuf); }
    9896%%
    9997
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette