Documentation Lacks Explanation: Comments don't handle at the beginning of a...
Generator of lexical analyzers in C and C++. Unicode Supported.
Brought to you by:
fschaef
Take the sample application 002.
Compile it with simple2.qx lexer.
Modify the sample source code example2.txt so the first line of code become a comment:
%% This is a comment
struct example:
..int x
..%% This is a comment
..double y
The token flow will contain invalid tokens at the beginning.
If I put an empty line into the source code before the comment it will work fine.
The 'indentation: comment' is only triggered after 'newline'.
If you want '%' to start a comment, you also need to setup a '<skip_range: "%"="" "\\n"=""> ' for that.
'skip_range' works beyond the indentation handling.
This is a lack in the online documentation. The documentation is currently under rework.
With your permission, I would like to file this against 'Documentation'.
Thanks for the fast reply!