/*@unused@*/ RCSID("$IdPath$");
#include "errwarn.h"
-
-#include "objfmt.h"
#include "preproc.h"
-
#include "hamt.h"
#include "src/preprocs/yapp/yapp-preproc.h"
#include "src/preprocs/yapp/yapp-token.h"
+#define ydebug(x) /* printf x */
+
static int is_interactive;
static int saved_length;
ym->args = argc;
ym->fillargs = fillargs;
- /*printf ("]]Inserting %s:%d:%d\n", name, argc, fillargs);*/
+ /*ydebug (("]]Inserting %s:%d:%d\n", name, argc, fillargs));*/
memcpy(&ym->macro_head, ¯o_head, sizeof(macro_head));
memcpy(&ym->param_head, ¶m_head, sizeof(param_head));
break;
case '+': case '-': case '*': case '/': case '%': case ',': case '\n':
+ case '[': case ']':
src->token.str = xmalloc(2);
src->token.str[0] = (char)token;
src->token.str[1] = '\0';
int token;
do {
token = yapp_preproc_lex();
+ ydebug(("YAPP: ATR: %c %s\n", token, yapp_preproc_lval.str_val));
if (token == 0)
return 0;
append_token(token);
char *s;
default:
append_token(token);
- if (append_through_return()==0) state=YAPP_STATE_EOF;
+ /*if (append_through_return()==0) state=YAPP_STATE_EOF;*/
+ ydebug(("YAPP: default: %c %s\n", token, yapp_preproc_lval.str_val));
/*Error(_("YAPP got an unhandled token."));*/
break;
case IDENT:
+ ydebug(("YAPP: ident: %s\n", yapp_preproc_lval.str_val));
if (yapp_defined(yapp_preproc_lval.str_val)) {
expand_macro(yapp_macro_get(yapp_preproc_lval.str_val));
}
break;
case DEFINE:
+ ydebug(("YAPP: define: "));
token = yapp_get_ident("define");
+ ydebug((" %s\n", yapp_preproc_lval.str_val));
s = xstrdup(yapp_preproc_lval.str_val);
/* three cases: newline or stuff or left paren */
/*@unused@*/ RCSID("$IdPath$");
#include "errwarn.h"
-
-#include "objfmt.h"
#include "preproc.h"
-
#include "hamt.h"
#include "src/preprocs/yapp/yapp-preproc.h"
#include "src/preprocs/yapp/yapp-token.h"
+#define ydebug(x) /* printf x */
+
static int is_interactive;
static int saved_length;
ym->args = argc;
ym->fillargs = fillargs;
- /*printf ("]]Inserting %s:%d:%d\n", name, argc, fillargs);*/
+ /*ydebug (("]]Inserting %s:%d:%d\n", name, argc, fillargs));*/
memcpy(&ym->macro_head, ¯o_head, sizeof(macro_head));
memcpy(&ym->param_head, ¶m_head, sizeof(param_head));
break;
case '+': case '-': case '*': case '/': case '%': case ',': case '\n':
+ case '[': case ']':
src->token.str = xmalloc(2);
src->token.str[0] = (char)token;
src->token.str[1] = '\0';
int token;
do {
token = yapp_preproc_lex();
+ ydebug(("YAPP: ATR: %c %s\n", token, yapp_preproc_lval.str_val));
if (token == 0)
return 0;
append_token(token);
char *s;
default:
append_token(token);
- if (append_through_return()==0) state=YAPP_STATE_EOF;
+ /*if (append_through_return()==0) state=YAPP_STATE_EOF;*/
+ ydebug(("YAPP: default: %c %s\n", token, yapp_preproc_lval.str_val));
/*Error(_("YAPP got an unhandled token."));*/
break;
case IDENT:
+ ydebug(("YAPP: ident: %s\n", yapp_preproc_lval.str_val));
if (yapp_defined(yapp_preproc_lval.str_val)) {
expand_macro(yapp_macro_get(yapp_preproc_lval.str_val));
}
break;
case DEFINE:
+ ydebug(("YAPP: define: "));
token = yapp_get_ident("define");
+ ydebug((" %s\n", yapp_preproc_lval.str_val));
s = xstrdup(yapp_preproc_lval.str_val);
/* three cases: newline or stuff or left paren */