Detect linenumbers of methods in the R grammar

20 views
Skip to first unread message

austen...@googlemail.com

unread,
Dec 18, 2013, 4:44:35 AM12/18/13
to antlr-di...@googlegroups.com
Hello,

i'm a beginner in using ANTLR and would like to extend the R grammar file:


I would like to detect R methods (and maybe later R S3 and S4 classes) in R source files.

The Parser should be used in an Editor to implement code folding so i need to detect the linestart  and lineend of all available methods in a file.
In the ANTLR book i read about Actions and Listeners.

How could i implement a method detection (linestart and lineend) in the R grammar. Do i have to use Actions or listeners and where do i have to put
the detetction in the R grammar?

Any help is appreciated.
Reply all
Reply to author
Forward
0 new messages