-/* $Id$ */
-
/* DataDesc/ddt_parse -- automatic parsing of data structures */
/* Copyright (c) 2004 Arnaud Legrand, Martin Quinson. All rights reserved. */
int gras_ddt_parse_char_pos = 0;
int gras_ddt_parse_tok_num = 0;
const char *definition;
- XBT_LOG_NEW_DEFAULT_SUBCATEGORY(lexer,ddt_parse,"The crude internals of the lexer used for type parsing");
-#define SHOW_WHERE DEBUG4("%d:%d (char #%d): seen '%s'", gras_ddt_parse_line_pos,gras_ddt_parse_col_pos,gras_ddt_parse_char_pos,yytext)
+ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(gras_ddt_lexer,gras_ddt_parse,"The crude internals of the lexer used for type parsing");
+#define SHOW_WHERE XBT_DEBUG("%d:%d (char #%d): seen '%s'", gras_ddt_parse_line_pos,gras_ddt_parse_col_pos,gras_ddt_parse_char_pos,yytext)
%}
%x annotate comment foo
int comment_caller=0;
int annotate_caller=0;
- char string_buf[GRAS_DDT_PARSE_MAX_STR_CONST];
- char *string_buf_ptr = NULL;
-
"//"[^\n]*
"/*g"{space}* { /****************** ANNOTATION ************************/
- DEBUG0("Begin annotation");
+ XBT_DEBUG("Begin annotation");
annotate_caller = INITIAL;
gras_ddt_parse_char_pos+= strlen(yytext);
gras_ddt_parse_col_pos+= strlen(yytext);
BEGIN(annotate);
}
<foo>"/*g"{space}* { /* trim annotation */
- DEBUG0("Begin annotation");
+ XBT_DEBUG("Begin annotation");
annotate_caller = foo;
gras_ddt_parse_char_pos+= strlen(yytext);
gras_ddt_parse_col_pos+= strlen(yytext);
}
<annotate>{space}*"g*/" {
- DEBUG0("End annotation");
+ XBT_DEBUG("End annotation");
gras_ddt_parse_char_pos+= strlen(yytext);
gras_ddt_parse_col_pos+= strlen(yytext);
BEGIN(annotate_caller);
gras_ddt_parse_line_pos = 1;
gras_ddt_parse_char_pos = 0;
gras_ddt_parse_tok_num = 0;
+
+ if (0)
+ yyunput('\0',NULL); /* fake a use of this function to calm gcc down */
}
/* Local variables:*/