[antlr-interest] ANTLR-Parser to deliver the lookahead

Seibert, Andreas andreas.seibert at fkie.fraunhofer.de
Tue Nov 8 02:38:16 PST 2011


Dear Prof. Dr. Parr,

 

my name is Andreas Seibert, I am working for the Fraunhofer Institute for Communication, Information Processing and Ergonomics (FKIE) near Bonn (Germany).

At the moment we are developing a graphical user interface for smartphones which are supposed to be used with an existing platform for crises management.

This GUI should support crises forces to communicate and to cooperate.

For a better understanding: In Germany there are several forces involved in crises management,

e.g., forces for search and rescue, forces for technical support, fire department, police and guidance.

 

Our system works with an ANTLR-grammar and we are having some difficulties solving the following problem so that we would be very grateful for your help.

 

The mobile GUI communicates with the base system. For that reason it is necessary for our ANTLR-Parser to deliver always the lookahead for the next input possible to the GUI.

In order for us to do something similar to auto-completion (i.e. showing all possible next tokens for an incomplete input sentence), we need to have the lookahead for an erroneous input.

 

At now, we see two options:

 

First, we might modify the ANTLR-Parser. That, however, would be a One-Way-Ticket because when we modify the grammar we would need to do this also for the Parser.

 

Second, we might modify the Compiler so that it compiles the Parser to always provide the lookahead. 

 

My questions are

1.     Is it possible to modify the Compiler as indicated in the second option?

2.     Has anyone already done such a modification so that we can use his or her results?

3.       Can you give us some advice where to do these modifications?

 

It would be very kind if you can give us some hints or answers about those questions 

and we would highly appreciate that.

 

Sincerely yours,

 

 

Andreas Seibert

 

Informationstechnik für Führungssysteme (ITF)

Fraunhofer-Institut für Kommunikation, Informationsverarbeitung und Ergonomie (FKIE)

 

Information Technology for Command and Control

Fraunhofer Institute for Communication, Information Processing and Ergonomics

 

Neuenahrer Straße 20 | 53343 Wachtberg | Germany

Tel.: +49 (0)228 9435-0

andreas.seibert at fkie.fraunhofer.de

http://www.fkie.fraunhofer.de <http://www.fkie.fraunhofer.de/> 

 

 



More information about the antlr-interest mailing list