mirror of
https://github.com/mudabbir-ahmad/UNI-PROG3-CW2-DYOPL.git
synced 2026-10-08 04:00:20 +00:00
37 lines
897 B
Python
37 lines
897 B
Python
# Generated from fspow.g4 by ANTLR
|
|
from antlr4 import *
|
|
#from idlelib.idle_test.test_configdialog import root
|
|
if __name__ is not None and "." in __name__:
|
|
from .fspowParser import fspowParser
|
|
else:
|
|
from fspowParser import fspowParser
|
|
|
|
# superclass
|
|
from fspowVisitor import fspowVisitor
|
|
|
|
# our own imports:
|
|
from repertoire.FileCollection import *
|
|
from repertoire.Selector import *
|
|
from repertoire.FSObject import *
|
|
|
|
# for symbol table
|
|
from collections import defaultdict
|
|
|
|
# This class defines a complete specific visitor for a parse tree produced by fspowParser.
|
|
|
|
class fspowVisitorUser(fspowVisitor):
|
|
|
|
# where all the variables reside
|
|
variablesTable = defaultdict()
|
|
|
|
|
|
# just write methods to be overridden
|
|
# in future, may want to implement multiple subclasses
|
|
# but for now, I'd copy the ones I need to override here to implement them
|
|
|
|
|
|
|
|
del fspowParser
|
|
|
|
|