awk: whitespace and debugging tweaks
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
95fffd8a7f
commit
dabbeeb793
@ -237,39 +237,40 @@ typedef struct tsplitter_s {
|
||||
#define TC_NUMBER (1 << 30)
|
||||
|
||||
#ifndef debug_parse_print_tc
|
||||
#define debug_parse_print_tc(n) do { \
|
||||
if ((n) & TC_LPAREN ) debug_printf_parse(" LPAREN" ); \
|
||||
if ((n) & TC_RPAREN ) debug_printf_parse(" RPAREN" ); \
|
||||
if ((n) & TC_REGEXP ) debug_printf_parse(" REGEXP" ); \
|
||||
if ((n) & TC_OUTRDR ) debug_printf_parse(" OUTRDR" ); \
|
||||
if ((n) & TC_UOPPOST ) debug_printf_parse(" UOPPOST" ); \
|
||||
if ((n) & TC_UOPPRE1 ) debug_printf_parse(" UOPPRE1" ); \
|
||||
if ((n) & TC_BINOPX ) debug_printf_parse(" BINOPX" ); \
|
||||
if ((n) & TC_IN ) debug_printf_parse(" IN" ); \
|
||||
if ((n) & TC_COMMA ) debug_printf_parse(" COMMA" ); \
|
||||
if ((n) & TC_PIPE ) debug_printf_parse(" PIPE" ); \
|
||||
if ((n) & TC_UOPPRE2 ) debug_printf_parse(" UOPPRE2" ); \
|
||||
if ((n) & TC_ARRTERM ) debug_printf_parse(" ARRTERM" ); \
|
||||
if ((n) & TC_LBRACE ) debug_printf_parse(" LBRACE" ); \
|
||||
if ((n) & TC_RBRACE ) debug_printf_parse(" RBRACE" ); \
|
||||
if ((n) & TC_SEMICOL ) debug_printf_parse(" SEMICOL" ); \
|
||||
if ((n) & TC_NEWLINE ) debug_printf_parse(" NEWLINE" ); \
|
||||
if ((n) & TC_STATX ) debug_printf_parse(" STATX" ); \
|
||||
if ((n) & TC_WHILE ) debug_printf_parse(" WHILE" ); \
|
||||
if ((n) & TC_ELSE ) debug_printf_parse(" ELSE" ); \
|
||||
if ((n) & TC_BUILTIN ) debug_printf_parse(" BUILTIN" ); \
|
||||
if ((n) & TC_LENGTH ) debug_printf_parse(" LENGTH" ); \
|
||||
if ((n) & TC_GETLINE ) debug_printf_parse(" GETLINE" ); \
|
||||
if ((n) & TC_FUNCDECL) debug_printf_parse(" FUNCDECL"); \
|
||||
if ((n) & TC_BEGIN ) debug_printf_parse(" BEGIN" ); \
|
||||
if ((n) & TC_END ) debug_printf_parse(" END" ); \
|
||||
if ((n) & TC_EOF ) debug_printf_parse(" EOF" ); \
|
||||
if ((n) & TC_VARIABLE) debug_printf_parse(" VARIABLE"); \
|
||||
if ((n) & TC_ARRAY ) debug_printf_parse(" ARRAY" ); \
|
||||
if ((n) & TC_FUNCTION) debug_printf_parse(" FUNCTION"); \
|
||||
if ((n) & TC_STRING ) debug_printf_parse(" STRING" ); \
|
||||
if ((n) & TC_NUMBER ) debug_printf_parse(" NUMBER" ); \
|
||||
} while (0)
|
||||
static void debug_parse_print_tc(uint32_t n)
|
||||
{
|
||||
if (n & TC_LPAREN ) debug_printf_parse(" LPAREN" );
|
||||
if (n & TC_RPAREN ) debug_printf_parse(" RPAREN" );
|
||||
if (n & TC_REGEXP ) debug_printf_parse(" REGEXP" );
|
||||
if (n & TC_OUTRDR ) debug_printf_parse(" OUTRDR" );
|
||||
if (n & TC_UOPPOST ) debug_printf_parse(" UOPPOST" );
|
||||
if (n & TC_UOPPRE1 ) debug_printf_parse(" UOPPRE1" );
|
||||
if (n & TC_BINOPX ) debug_printf_parse(" BINOPX" );
|
||||
if (n & TC_IN ) debug_printf_parse(" IN" );
|
||||
if (n & TC_COMMA ) debug_printf_parse(" COMMA" );
|
||||
if (n & TC_PIPE ) debug_printf_parse(" PIPE" );
|
||||
if (n & TC_UOPPRE2 ) debug_printf_parse(" UOPPRE2" );
|
||||
if (n & TC_ARRTERM ) debug_printf_parse(" ARRTERM" );
|
||||
if (n & TC_LBRACE ) debug_printf_parse(" LBRACE" );
|
||||
if (n & TC_RBRACE ) debug_printf_parse(" RBRACE" );
|
||||
if (n & TC_SEMICOL ) debug_printf_parse(" SEMICOL" );
|
||||
if (n & TC_NEWLINE ) debug_printf_parse(" NEWLINE" );
|
||||
if (n & TC_STATX ) debug_printf_parse(" STATX" );
|
||||
if (n & TC_WHILE ) debug_printf_parse(" WHILE" );
|
||||
if (n & TC_ELSE ) debug_printf_parse(" ELSE" );
|
||||
if (n & TC_BUILTIN ) debug_printf_parse(" BUILTIN" );
|
||||
if (n & TC_LENGTH ) debug_printf_parse(" LENGTH" );
|
||||
if (n & TC_GETLINE ) debug_printf_parse(" GETLINE" );
|
||||
if (n & TC_FUNCDECL) debug_printf_parse(" FUNCDECL");
|
||||
if (n & TC_BEGIN ) debug_printf_parse(" BEGIN" );
|
||||
if (n & TC_END ) debug_printf_parse(" END" );
|
||||
if (n & TC_EOF ) debug_printf_parse(" EOF" );
|
||||
if (n & TC_VARIABLE) debug_printf_parse(" VARIABLE");
|
||||
if (n & TC_ARRAY ) debug_printf_parse(" ARRAY" );
|
||||
if (n & TC_FUNCTION) debug_printf_parse(" FUNCTION");
|
||||
if (n & TC_STRING ) debug_printf_parse(" STRING" );
|
||||
if (n & TC_NUMBER ) debug_printf_parse(" NUMBER" );
|
||||
}
|
||||
#endif
|
||||
|
||||
/* combined token classes ("token [class] sets") */
|
||||
@ -1802,7 +1803,6 @@ static void parse_program(char *p)
|
||||
} /* for (;;) */
|
||||
}
|
||||
|
||||
|
||||
/* -------- program execution part -------- */
|
||||
|
||||
/* temporary variables allocator */
|
||||
@ -3510,7 +3510,6 @@ static var *evaluate(node *op, var *res)
|
||||
#undef sreg
|
||||
}
|
||||
|
||||
|
||||
/* -------- main & co. -------- */
|
||||
|
||||
static int awk_exit(void)
|
||||
|
Loading…
Reference in New Issue
Block a user