3
* Copyright 2001 Silicon Graphics, Inc. All rights reserved.
5
* This program is free software; you can redistribute it and/or modify
6
* it under the terms of the GNU General Public License as published by
7
* the Free Software Foundation; either version 2 of the License, or
8
* (at your option) any later version.
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
23
#define YY_INPUT(buf,result,max_size) \
25
int c = sial_input(); \
26
result = (c == EOF) ? YY_NULL : (buf[0] = c, 1); \
31
#include "sialpp.tab.h"
33
#define yylval sialpplval
36
#define retok(t) return(t)
38
extern int sial_chkmacvar(char *);
39
extern node_t *sial_newchar(void);
51
"defined" { retok(P_DEFINED); }
52
"&&" { retok(P_BAND); }
53
"||" { retok(P_BOR); }
63
">>" { retok(P_SHR); }
64
"<<" { retok(P_SHL); }
71
(("0x"+){X}+[lL]*|{N}+[lL]*) { yylval.n = sial_newnum(yytext); retok(P_NUMBER); }
74
if(strlen(yytext) > MAX_SYMNAMELEN) {
76
sial_error("Symbol name too long");
78
if(nomacs || !sial_chkmacvar(yytext)) {
80
yylval.n = sial_newvnode(yytext);
85
\'.\' { yylval.n = sial_makenum(B_SC, yytext[1]); retok(P_NUMBER); }
86
\'\\.\' { yylval.n = sial_makenum(B_SC, sial_getseq(yytext[2])); retok(P_NUMBER); }
89
. { retok(yylval.i = yytext[0]); }
94
#define input() sial_input()
95
#define unput(c) sial_unput(c)