|Re: Xtext generated parser reports errors - why? [message #702335 is a reply to message #701911]
||Tue, 26 July 2011 08:27
| FJ Stöver
Registered: July 2011
Location: Aachen, Germany
Hi Alexander, hi Meinte,|
Thank you for your contributions.
@Meinte: Parse "ABXY" as terminal rule is not an option, because any 4 letter combination of arbitrary chars is possible.
@Alexander: I don't have 'ID', because I don't use the built-in terminals from 'org.eclipse.xtext.common.Terminals'
What I learned: The lexer/tokenizer causes the problem. It does not only look for terminal rules (which I knew) but as well for keywords (like the 'xy ') - which I hadn't expected.
With all respect as a newbie: I wonder if that's an (architectural) bug in Xtext?
I think that the grammar describes clearly that the 'FourLetters' consist of arbitrary 4 letters; if the lexer/tokenizer decides to look for 'XY ' in that element it seems for me a wrong decision.
By the way, to give an idea of my application domain: I'm investigating Xtext to parse messages of the 'Airline teletype system' (http...://en.wikipedia.org/wiki/Airline_teletype_system) - which is widely used, but was defined nearly 90 years ago - long before computers came to life. Actually, when your flight is late such a message is generated. The messages are well defined, but the inventors didn' know much about Xtext - like me
kind regards Franz-Josef
Powered by FUDForum
. Page generated in 0.02351 seconds