#define PUSHOP(O) LEXTOK(O, val, 0)
#define PUSHPATH(P) LEXTOK(PATH, str, P)
#define PUSHOP(O) LEXTOK(O, val, 0)
#define PUSHPATH(P) LEXTOK(PATH, str, P)
/* Lexstring is the main lexer for APC and is generated by ragel. It lexes file names of files
that have been scanned and pushes their types and values into the tok_stack, which yyparse
eventually calls during parsing. */
/* Lexstring is the main lexer for APC and is generated by ragel. It lexes file names of files
that have been scanned and pushes their types and values into the tok_stack, which yyparse
eventually calls during parsing. */
- action ref_error { //printf("ref from %s to %s has an inappropriate amount of hex digits, it must have eight.\n", ts, p);
+ action ref_error { if(DEBUG) printf("ref from %s to %s has an inappropriate amount of hex digits, it must have eight.\n", ts, p);
direction = (N | W | S | E | NW | NE | SW | SE) ;
dimensions = (digit+ - '0') >set_ts %push_val 'x' (digit+ - '0') >set_ts %push_val;
direction = (N | W | S | E | NW | NE | SW | SE) ;
dimensions = (digit+ - '0') >set_ts %push_val 'x' (digit+ - '0') >set_ts %push_val;
- //printf("|---Begin lexstring on p = %s, pe = %s.\n",p, pe);
+ if(DEBUG) printf("|---Begin lexstring on p = %s, pe = %s.\n",p, pe);
- //printf("Ending lexstring of file %s, pushed %d tokens.\n",str, ntok);
+ if(DEBUG) printf("Ending lexstring of file %s, pushed %d tokens.\n",str, ntok);