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

ctrl.gsp

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



/**
 * Control symbols. Control symbols do not parse anything but rather act
 * like parse control functions.
 * There are intended to add some control over parent symbols, like whitespace
 * enabling.
 */

_disableWhitespaceEating ::= 
{{
  if (hasParent())
  {
    /* The following line is not useful because whitespaces are not
     * eaten by a non-terminal itself, except for constants.
     * but in this case, whitespaces eaten for constants preceding
     * this command should be preserved.
     * parent().cancelWhitespaceEating();
     */

    parent().disableWhitespaceEating(true);
  }
}}

_enableWhitespaceEating ::= 
{{
  if (hasParent())
  {
    parent().disableWhitespaceEating(false);
  }
}}

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