ref: 86976ce9f6fdcb42678d18e61f9d64e615bc163c
parent: 732ddd32abbd5cdd3bd7581c8be050871f44482f
author: Roberto E. Vargas Caballero <[email protected]>
date: Tue May 29 17:29:29 EDT 2012
Moved definition of union yyval to tokens.h This value will be used in others files, so it is necessary put it in a place where it can be located by the others modules. The better place for this issue is in tokens header.
--- a/lex.c
+++ b/lex.c
@@ -62,12 +62,6 @@
const char *filename;
-union yyval {
- struct symbol *sym;
-} yyval;
-
-
-
static unsigned char hashfun(register const char *s)
{
register unsigned char h, ch;
--- a/tokens.h
+++ b/tokens.h
@@ -32,10 +32,20 @@
CONTINUE, BREAK, RETURN, EOFTOK
};
+
+
+union yyval {
+ struct symbol *sym;
+} yyval;
+
+
+
extern char yytext[];
extern unsigned char yyhash;
extern size_t yylen;
extern unsigned char yytoken;
+extern union yyval yyval;
+
extern unsigned char gettok(void);
extern void init_lex(void);