Line 11... |
Line 11... |
**
|
**
|
** #define macro's are also defined in the language and therefore
|
** #define macro's are also defined in the language and therefore
|
** supposed to be supported, but the support isn't there yet.
|
** supposed to be supported, but the support isn't there yet.
|
**
|
**
|
** Creator: Dan Gisselquist, Ph.D.
|
** Creator: Dan Gisselquist, Ph.D.
|
** Gisselquist Tecnology, LLC
|
** Gisselquist Technology, LLC
|
**
|
**
|
********************************************************************************
|
********************************************************************************
|
**
|
**
|
** Copyright (C) 2015, Gisselquist Technology, LLC
|
** Copyright (C) 2015, Gisselquist Technology, LLC
|
**
|
**
|
Line 131... |
Line 131... |
*ptr = '\0';
|
*ptr = '\0';
|
stb_macro(stb_getdefn(dup));
|
stb_macro(stb_getdefn(dup));
|
free(dup);
|
free(dup);
|
yyless(strchr(yytext,'(')-yytext);
|
yyless(strchr(yytext,'(')-yytext);
|
}
|
}
|
|
} else if (!stb_current(yytext)) {
|
|
stb_macro(yytext);
|
} else {
|
} else {
|
char *dup = strdup(yytext), *ptr;
|
char *dup = strdup(yytext), *ptr;
|
ptr = strchr(dup, '(');
|
ptr = strchr(dup, '(');
|
*ptr = '\0';
|
*ptr = '\0';
|
stb_macro(stb_getdefn(dup));
|
stb_macro(stb_getdefn(dup));
|
Line 259... |
Line 261... |
} else {
|
} else {
|
// fprintf(stderr, "But it is not defined\n");
|
// fprintf(stderr, "But it is not defined\n");
|
fprintf(yyout, "%s", yytext);
|
fprintf(yyout, "%s", yytext);
|
}
|
}
|
}
|
}
|
|
"\'"(("\\\'")|([^'\\])|("\\"[0abfnrtv])|("\\\\")|("\\\"")){1,4}"\'" { ECHO; }
|
<*>[ \t]*"//".*$ { /* Ignore (trailing) comment only lines */ }
|
<*>[ \t]*"//".*$ { /* Ignore (trailing) comment only lines */ }
|
<*>[ \t]*";".*$ { /* Ignore (trailing) comment only lines */ }
|
<*>[ \t]*";".*$ { /* Ignore (trailing) comment only lines */ }
|
<*>"#warning".*$ { fprintf(stderr, "WARNING: %s\n", &yytext[8]); }
|
<*>"#warning".*$ { fprintf(stderr, "WARNING: %s\n", &yytext[8]); }
|
<*>"#error".*$ { fprintf(stderr, "ERROR: %s\n", &yytext[8]); exit(-1); }
|
<*>"#error".*$ { fprintf(stderr, "ERROR: %s\n", &yytext[8]); exit(-1); }
|
<*>"/*" { yy_push_state(COMMENT); }
|
<*>"/*" { yy_push_state(COMMENT); }
|