change antlr4 includes to specific members
This commit is contained in:
parent
e7d0a59ccb
commit
9378112570
10
comment.py
10
comment.py
|
@ -15,11 +15,13 @@ __email__ = "kevin@company235.com"
|
|||
__status__ = "Prototype"
|
||||
|
||||
|
||||
import antlr4
|
||||
import configparser
|
||||
import logging
|
||||
import sys
|
||||
|
||||
from antlr4 import CommonTokenStream
|
||||
from antlr4 import InputStream
|
||||
from antlr4 import ParseTreeWalker
|
||||
from antlr4.error.ErrorListener import ErrorListener
|
||||
from CommentMacroLexer import CommentMacroLexer
|
||||
from CommentMacroParser import CommentMacroParser
|
||||
|
@ -52,13 +54,13 @@ servers[net] = udp_client.SimpleUDPClient(server.get("ip", "10.0.0.1"),
|
|||
server.getint("port", 6600))
|
||||
|
||||
oscMacro = OscCommentMacroListener(servers)
|
||||
walker = antlr4.ParseTreeWalker()
|
||||
walker = ParseTreeWalker()
|
||||
|
||||
|
||||
def comment(text):
|
||||
input_stream = antlr4.InputStream(text)
|
||||
input_stream = InputStream(text)
|
||||
lexer = CommentMacroLexer(input_stream)
|
||||
stream = antlr4.CommonTokenStream(lexer)
|
||||
stream = CommonTokenStream(lexer)
|
||||
parser = CommentMacroParser(stream)
|
||||
parser._listeners.append(SyntaxErrorListener())
|
||||
try:
|
||||
|
|
Loading…
Reference in New Issue