LLOOP Index | GSP Language | GSP Library | Framework Classes | Component Classes

ini_comment.gsp

This is the verbatim text of the file "ini_comment.gsp" part of the LLOOP package. The copyright remains with Michel MEHL. All rights reserved.



/**
 * Pre-processes Windows Ini File comments.
 *
 * Strips the input of all ini comments, 
 * i.e. all chars following ; till end of line.
 */ 

preprocessor ini_comment 
{{
  static bool bInComment = false;
  if (bInComment)
    {
      if (c == '\n')
	bInComment = false; // Keep the new lines for the line count
      else
	discard();
    }
  else if (c == ';') // Comment detected
    {
      bInComment = true;
      discard();
    }
}}

This file is part of the LLOOP Reversible Object-Oriented Parser Generator. Copyright (c) 2005-2006 Michel MEHL, France. All rights reserved. LLOOP is distributed by the company ERSA SaRL.


Copyright (c) 2005-2006 Michel MEHL, Haguenau, France
LLOOP version 1.1