printing is skipped. In all other cases, 'yylval' is set, and the token's
integer representation is returned.
*/
-int lexer
#define $($)#$
#define SCAN_ERROR -1
#define TK_EMPTY (TK_STACKP == TK_STACKX)
fprintf(stderr,__VA_ARGS__); \
goto done; \
} while (0)
+int lexer
()
{ struct tok token;
start:
/* Token Receiver
This receiver takes a struct tok and pushes it to the FIFO stack.
*/
-void lexer_pushtok
#define $($)#$ //stringifier
#define ERR_TK "Fatal: Generated over " $(TK_STACKSIZE) " tokens in one pass."
-( int tok, YYSTYPE lval )
+void lexer_pushtok
+( int tok,
+ YYSTYPE lval
+)
{ if (TK_LEN() >= TK_STACKSIZE)
{ fprintf(stderr, ERR_TK);
exit(EXIT_FAILURE);
/* Lexical analysis of a file
Strips a filename to its base name, then sends it to lexer_lex
*/
-int lexer_lexfile
#define HIDDEN_WARNING "%s is hidden and will not be parsed!\n", filename
+int lexer_lexfile
( const uint8_t *filename
)
{ static uint8_t fname[FNAME_MAX];
/* Scan filename and push the its tokens
onto the stack */
int lexer_lexfilename
-(uint8_t* str)
+( uint8_t* str
+)
{ int ntok, len;
uint8_t *filepath;