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

dos_comment.gsp

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



/**
 * Pre-processes MS-DOS comments (')
 * Strips the input data of all ' comments 
 * regardless of whether the comment is within quotes. 
 * The REM notation is not supported.
 */ 

preprocessor dos_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