v4: Fix the BlankListenerFile template

[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9408]
This commit is contained in:
sharwell 2011-11-19 15:04:26 -08:00
parent 140f0fc098
commit 426d96c3b8
1 changed files with 10 additions and 10 deletions

View File

@ -31,27 +31,27 @@ TreeParserFile(file, parser, namedActions) ::= <<
<ParserFile(...)> <ParserFile(...)>
>> >>
ListenerFile(listener, header) ::= << ListenerFile(file, header) ::= <<
<header> <header>
import org.antlr.v4.runtime.tree.ParseTreeListener; import org.antlr.v4.runtime.tree.ParseTreeListener;
public interface <listener.grammarName>Listener extends ParseTreeListener { public interface <file.grammarName>Listener extends ParseTreeListener {
<listener.listenerNames:{lname | <file.listenerNames:{lname |
void enterRule(<listener.parserName>.<lname>Context ctx); void enterRule(<file.parserName>.<lname>Context ctx);
void exitRule(<listener.parserName>.<lname>Context ctx);}; separator="\n"> void exitRule(<file.parserName>.<lname>Context ctx);}; separator="\n">
} }
>> >>
BlankListenerFile(listener, header) ::= << BlankListenerFile(file, header) ::= <<
<header> <header>
import org.antlr.v4.runtime.ParserRuleContext; import org.antlr.v4.runtime.ParserRuleContext;
import org.antlr.v4.runtime.Token; import org.antlr.v4.runtime.Token;
public class Blank<listener.grammarName>Listener implements <listener.grammarName>Listener { public class Blank<file.grammarName>Listener implements <file.grammarName>Listener {
<listener.listenerNames:{lname | <file.listenerNames:{lname |
@Override public void enterRule(<listener.parserName>.<lname>Context ctx) { \} @Override public void enterRule(<file.parserName>.<lname>Context ctx) { \}
@Override public void exitRule(<listener.parserName>.<lname>Context ctx) { \}}; separator="\n"> @Override public void exitRule(<file.parserName>.<lname>Context ctx) { \}}; separator="\n">
@Override public void enterEveryRule(ParserRuleContext\<<TokenLabelType()> > ctx) { } @Override public void enterEveryRule(ParserRuleContext\<<TokenLabelType()> > ctx) { }
@Override public void exitEveryRule(ParserRuleContext\<<TokenLabelType()> > ctx) { } @Override public void exitEveryRule(ParserRuleContext\<<TokenLabelType()> > ctx) { }