forked from jasder/antlr
tweak
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9055]
This commit is contained in:
parent
297087770e
commit
c16782c848
|
@ -39,8 +39,8 @@ ListenerFile(listener) ::= <<
|
|||
@SuppressWarnings({"all", "warnings", "unchecked", "unused"})
|
||||
public interface <listener.grammarName>Listener {
|
||||
<listener.rules:{r |
|
||||
void enterRule(<listener.grammarName>.<r.name>_ctx ctx);
|
||||
void exitRule(<listener.grammarName>.<r.name>_ctx ctx);}; separator="\n">
|
||||
void enterRule(<listener.parserName>.<r.name>_ctx ctx);
|
||||
void exitRule(<listener.parserName>.<r.name>_ctx ctx);}; separator="\n">
|
||||
}
|
||||
>>
|
||||
|
||||
|
|
|
@ -12,12 +12,14 @@ import java.util.Collection;
|
|||
public class ListenerFile extends OutputModelObject {
|
||||
public String fileName;
|
||||
public String grammarName;
|
||||
public String parserName;
|
||||
public Collection<Rule> rules;
|
||||
|
||||
public ListenerFile(OutputModelFactory factory, String fileName) {
|
||||
super(factory);
|
||||
this.fileName = fileName;
|
||||
Grammar g = factory.getGrammar();
|
||||
parserName = g.getRecognizerName();
|
||||
grammarName = g.name;
|
||||
rules = g.rules.values();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue