[antlr-interest] Syntax- highlighter and completition

Nieves.Salor.Moral at esa.int Nieves.Salor.Moral at esa.int
Thu Aug 12 03:40:51 PDT 2010


Helllo!!

I think this is an old topic, but looking at the list I haven't found a 
clear answer to the problem. I am trying to do a system that opens in a 
swing panel an specific type file, which follows my specific grammar and 
allows its editing.
Hence, I want to add syntax-highlighting and also auto completion to the 
file (both in the editing and in the only reading), But also I should show 
the syntax tree. 

I have my ANTLR grammar running (pluto.g) and tested with current output 
as a flat AST tree. But I am not entirely sure what to do next.

My first option is to specify as output templates and use directly from 
the parser grammar StringTemplate with the output specifying the colors, 
font, etc in a kind of HTML similar code and later plug-in in the swing 
panel
Second option, is to create a Parser Tree and later on, use the templates 
Third, forget the parser and just use the lexer????

The problem is that the final goal of the system is to create SQL queries 
to insert/modify in a DB the information that contains the grammar.

Any outputs are welcome, thanks



Nieves Salor Moral
-------------- next part --------------
A non-text attachment was scrubbed...
Name: example5.g
Type: application/octet-stream
Size: 14898 bytes
Desc: not available
Url : http://www.antlr.org/pipermail/antlr-interest/attachments/20100812/8e3035c4/attachment.obj 


More information about the antlr-interest mailing list