return(token_new2(_line, _col, "-="));
default:
- putchar(c);
+ putnext(c);
return(token_new2(_line, _col, "-"));
}
case STATE_NUM:
/* FIXME: e, E may be in the middle, (u|U)(l|L|ll|LL) or vice versa may be at the end */
-
if(c >= '0' && c <= '9' || c == '.') {
str_appendc(tok->value, c);
} else {
ret_val = 0;
while((tok = nexttoken())) {
- printf("Token at %d:%d: %s\n", tok->line, tok->column, str_value(tok->value));
- }
-#if 0
- while(_state != STATE_DONE) {
- printf("_state = %d\n", _state);
-
- switch(_state) {
- case STATE_NONE:
- _state = none();
- break;
-
- case STATE_COMMENT:
- _state = comment();
- break;
-
- case STATE_OP:
- _state = op();
- break;
-
- default:
- _state = STATE_DONE;
- break;
- }
- }
-
- if(!tokens) {
- printf("No tokens\n");
- }
-
- for(litem = tokens; litem; litem = litem->next) {
- struct token *t;
-
- t = (struct token*)litem->data;
-
- printf("%s token at line %d:%d\n", token_typestr(t->type), t->line, t->column);
+ printf("Token at %4d:%3d: \"%s\"\n", tok->line, tok->column, str_value(tok->value));
}
-#endif
return(ret_val);
}