This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 17163

Summary: editor to use antlr.g
Product: obsolete Reporter: _ derrick <derrick>
Component: antlrAssignee: issues@obsolete <issues>
Status: RESOLVED FIXED    
Severity: blocker CC: mmetelka
Priority: P4    
Version: 3.x   
Hardware: All   
OS: All   
Issue Type: TASK Exception Reporter:

Description _ derrick 2001-10-31 13:04:26 UTC
The editor currently has a syntax subsystem (e.g. AntlrSyntax.java) based on
similar looking code in the JSP editor.  Since the definitive syntax for .g
files is the antlr.g file rpovided with Antlr, the syntax subsystem should
instead be based on a lexer and parser generated from (a modified) antlr.g.
There will need to be a squish layer that translates antlr generated tokens into
the tokens recognised by the editor syntax coloring system.

Since a lot of the 'value add' in a .g file is the java code in the header
sections and embedded in rules, this too should be syntax colored, probably by
using the context switching capabilities in Antlr 2.7.1 to switching to/from a
java lexer/parser in mid token stream.
Comment 1 Jesse Glick 2001-10-31 13:41:31 UTC
You may want to talk to Miloslav Metelka and ask about the lexer
module which is in netbeans.org but I think does not yet have sources
committed to it.
Comment 2 Miloslav Metelka 2001-10-31 16:55:43 UTC
Regarding the lexer module I'm just waiting for the legal issues to
include antlr.jar into our nbextra repository. Then I will perform the
initial checkin.
Antlr is currently one of the two supported lexer generators together
with javacc. The antlr 2.7.1 should generate more efficient code for
unicode which is good.
The language embedding will also be supported.
We definitely want the lexer module to be used for syntax coloring in
3.4.I'll write to nbdev once the initial checkin into the lexer module
will be performed.
Comment 3 Jiri Prox 2007-09-17 21:47:39 UTC
Obsolete milestone, please reevaluate
Comment 4 Miloslav Metelka 2007-09-18 08:41:03 UTC
The antlr was later added to the lexer module and was functioning there so I consider this as fixed.