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

LLOOP Bugs, Limitations and Troubleshooting

This page gives some hints to solve problems that are likely to be frequently encountered by developers. Please check that your problem is actually not arising from any of the LLOOP's technical restrictions.


Index

  1. Compilation issues
  2. White spaces are not reconstituted properly when expanding parsed object
  3. Parsed input is not reconstituted properly when expanding it
  4. Infinite recursion: Parser runs a while and then crash with a memory overflow
  5. No backtracking: Parsing fails even though grammar seems correct
  6. Other writings to avoid

White spaces are not reconstituted properly when expanding parsed object

First possible reason: there is a limitation regarding the number of whitespaces that can be preserved between two constants/tokens. This limit is set to 80 white space chars. Check whether you are not in this case.

Workaround: Limit white space chars in input.

Second possible reason: whitespace chars preceding constants within repetitive symbol sequences are not preserved. Only the whitespace chars preceding the first constant occurrence are preserved. The same whitespace chars are reconstituted afterwards during expanding before each constant occurrence.

Workaround: Put only non-terminals and tokens within repetitive sequences {...} and create new rules encapsulating symbol sequences containing constants.

Parsed input is not reconstituted properly when expanding it

Possible reason: There is known problem regarding constants part of optional symbol sequences [...], which are themselves located within an upper repetitive symbol sequence. If the constant could be parsed at least once, the constant is expanded as it was parsed for each occurrence of the upper repetitive symbol sequence. This case is not a problem for the parsing itself, only for the expanding.

Workaround: Put only non-terminals and tokens within repetitive sequences {...} and create new rules encapsulating symbol sequences containing constants.

Parser runs a while and then crash with a memory overflow

Your problem may stem from an indirect infinite recursion defined in your grammar.

Please check the corresponding example provided with LLOOP here.

Parsing fails even though grammar seems correct

Your problem may stem from the lack of bracktracking support of LLOOP.

LLOOP parsers attempt to construct the syntactical tree from top to bottom in the grammar by trying out possible rules till to find one corresponding to the input stream. The succession of the rules selected is called the rule path. If at the end of the path no rule is finally acceptable, the parsing fails.

Backtracking allows to go backwards in the rule path and try out all possible rules until to find an acceptable path of rules.

Please check the corresponding example provided with LLOOP here.

Other writings to avoid

Compilation issues

This gives some hints for the proper compiling of the generated code. Normally, if generated makefiles are used, this information is not useful.

All platforms

It must be ensured that RTTI is enabled (Run-Time Type Information). Recent compilers normally all support this by default.

Make sure to know and configure the proper version of the C++ stream you want/need to use. If your C++ stream version doesn't define the std namespace yet (rare), you may additionnally define the following pre-processor define:

NO_STD_NAMESPACE

Windows platforms

If you intend to compile the code for an executable file, you may specify the following pre-processor defines to be sure your code is compiling properly regardless of the Visual Studio version:

LLOOP_DLL=""
UNIVERSAL_DLL=""

If you intend to compile the code for a DLL library, you may export the generated classes by defining the following pre-processor defines:

LLOOP_EXPORT
UNIVERSAL_EXPORT

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