Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of git+ssh://scm.gforge.inria.fr//gitroot//simgrid/simgrid
[simgrid.git] / src / gras / DataDesc / ddt_parse.yy.l
index 35a9c22..29d029d 100644 (file)
@@ -1,5 +1,3 @@
-/* $Id$ */
-
 /* DataDesc/ddt_parse -- automatic parsing of data structures */
 
 /* Copyright (c) 2004 Arnaud Legrand, Martin Quinson. All rights reserved.  */
@@ -7,9 +5,6 @@
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
-/*   char string_buf[GRAS_DDT_PARSE_MAX_STR_CONST];
-     char *string_buf_ptr = NULL; FIXME; killme*/
-
 %option noyywrap
 %{
 #include "gras/DataDesc/datadesc_private.h"
@@ -23,8 +18,8 @@
   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
@@ -39,14 +34,14 @@ digit           [0-9]
 "//"[^\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);
@@ -54,17 +49,17 @@ digit           [0-9]
 }
 
 <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);
 }
 
 <annotate>"*/" {
-  PARSE_ERROR0("``/*g'' construct closed by a regular ``*/''");
+  PARSE_ERROR("``/*g'' construct closed by a regular ``*/''");
 }
 <annotate>\n  {
-  PARSE_ERROR0("Type annotation cannot spread over several lines");
+  PARSE_ERROR("Type annotation cannot spread over several lines");
 }
 
 <annotate>.* { /* eat the rest */