2
0
mirror of https://gitlab.com/apparmor/apparmor synced 2025-08-31 06:16:03 +00:00

* set yydebug when YYDEBUG is set, this will cause mucho bison debuginfo

to be emitted.
* whitespace fixup
This commit is contained in:
Steve Beattie
2009-03-13 05:19:39 +00:00
parent 947a77bcde
commit 1acfd92d8a
2 changed files with 7 additions and 1 deletions

View File

@@ -18,6 +18,8 @@
%{
/* set the following to non-zero to get bison to emit debugging
* information about tokens given and rules matched. */
#define YYDEBUG 0
#include <string.h>
#include "aalogparse.h"
@@ -451,6 +453,10 @@ _parse_yacc(char *str)
if (ret_record == NULL)
return NULL;
#if (YYDEBUG != 0)
yydebug = 1;
#endif
aalogparse_lex_init(&scanner);
lex_buf = aalogparse__scan_string(str, scanner);
parser_return = aalogparse_parse(scanner);

View File

@@ -237,7 +237,7 @@ char *string_buf_ptr = string_buf; /* assignment to quiet gcc warning */
{colon} { return(TOK_COLON); }
{open_paren} {
BEGIN(sub_id);
return(TOK_OPEN_PAREN);
return(TOK_OPEN_PAREN);
}
{close_paren} { return(TOK_CLOSE_PAREN); }
{path} { yylval->t_str = strdup(yytext); return(TOK_PATH); }