RelayVisitor.py 11 KB
Newer Older
1
# Generated from /Users/doobs/Code/repo/sampl/tvm/python/tvm/relay/grammar/Relay.g4 by ANTLR 4.7.2
2 3 4 5 6 7 8 9 10 11
from antlr4 import *
if __name__ is not None and "." in __name__:
    from .RelayParser import RelayParser
else:
    from RelayParser import RelayParser

# This class defines a complete generic visitor for a parse tree produced by RelayParser.

class RelayVisitor(ParseTreeVisitor):

12 13
    # Visit a parse tree produced by RelayParser#prog.
    def visitProg(self, ctx:RelayParser.ProgContext):
14 15 16
        return self.visitChildren(ctx)


17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
    # Visit a parse tree produced by RelayParser#generalIdent.
    def visitGeneralIdent(self, ctx:RelayParser.GeneralIdentContext):
        return self.visitChildren(ctx)


    # Visit a parse tree produced by RelayParser#globalVar.
    def visitGlobalVar(self, ctx:RelayParser.GlobalVarContext):
        return self.visitChildren(ctx)


    # Visit a parse tree produced by RelayParser#localVar.
    def visitLocalVar(self, ctx:RelayParser.LocalVarContext):
        return self.visitChildren(ctx)


    # Visit a parse tree produced by RelayParser#graphVar.
    def visitGraphVar(self, ctx:RelayParser.GraphVarContext):
34 35 36
        return self.visitChildren(ctx)


37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
    # Visit a parse tree produced by RelayParser#exprList.
    def visitExprList(self, ctx:RelayParser.ExprListContext):
        return self.visitChildren(ctx)


    # Visit a parse tree produced by RelayParser#callNoAttr.
    def visitCallNoAttr(self, ctx:RelayParser.CallNoAttrContext):
        return self.visitChildren(ctx)


    # Visit a parse tree produced by RelayParser#callWithAttr.
    def visitCallWithAttr(self, ctx:RelayParser.CallWithAttrContext):
        return self.visitChildren(ctx)


    # Visit a parse tree produced by RelayParser#funcExpr.
    def visitFuncExpr(self, ctx:RelayParser.FuncExprContext):
        return self.visitChildren(ctx)


    # Visit a parse tree produced by RelayParser#metaExpr.
    def visitMetaExpr(self, ctx:RelayParser.MetaExprContext):
        return self.visitChildren(ctx)


62 63 64 65 66
    # Visit a parse tree produced by RelayParser#match.
    def visitMatch(self, ctx:RelayParser.MatchContext):
        return self.visitChildren(ctx)


67 68 69 70 71 72 73 74 75 76
    # Visit a parse tree produced by RelayParser#tensor.
    def visitTensor(self, ctx:RelayParser.TensorContext):
        return self.visitChildren(ctx)


    # Visit a parse tree produced by RelayParser#graph.
    def visitGraph(self, ctx:RelayParser.GraphContext):
        return self.visitChildren(ctx)


77 78 79 80 81
    # Visit a parse tree produced by RelayParser#identExpr.
    def visitIdentExpr(self, ctx:RelayParser.IdentExprContext):
        return self.visitChildren(ctx)


82 83 84 85 86
    # Visit a parse tree produced by RelayParser#stringExpr.
    def visitStringExpr(self, ctx:RelayParser.StringExprContext):
        return self.visitChildren(ctx)


87 88 89 90 91 92 93 94 95 96 97 98 99 100 101
    # Visit a parse tree produced by RelayParser#call.
    def visitCall(self, ctx:RelayParser.CallContext):
        return self.visitChildren(ctx)


    # Visit a parse tree produced by RelayParser#neg.
    def visitNeg(self, ctx:RelayParser.NegContext):
        return self.visitChildren(ctx)


    # Visit a parse tree produced by RelayParser#tuple.
    def visitTuple(self, ctx:RelayParser.TupleContext):
        return self.visitChildren(ctx)


102 103
    # Visit a parse tree produced by RelayParser#paren.
    def visitParen(self, ctx:RelayParser.ParenContext):
104 105 106 107 108 109 110 111 112 113 114 115 116
        return self.visitChildren(ctx)


    # Visit a parse tree produced by RelayParser#scalarExpr.
    def visitScalarExpr(self, ctx:RelayParser.ScalarExprContext):
        return self.visitChildren(ctx)


    # Visit a parse tree produced by RelayParser#let.
    def visitLet(self, ctx:RelayParser.LetContext):
        return self.visitChildren(ctx)


117 118
    # Visit a parse tree produced by RelayParser#projection.
    def visitProjection(self, ctx:RelayParser.ProjectionContext):
119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136
        return self.visitChildren(ctx)


    # Visit a parse tree produced by RelayParser#ifElse.
    def visitIfElse(self, ctx:RelayParser.IfElseContext):
        return self.visitChildren(ctx)


    # Visit a parse tree produced by RelayParser#binOp.
    def visitBinOp(self, ctx:RelayParser.BinOpContext):
        return self.visitChildren(ctx)


    # Visit a parse tree produced by RelayParser#func.
    def visitFunc(self, ctx:RelayParser.FuncContext):
        return self.visitChildren(ctx)


137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186
    # Visit a parse tree produced by RelayParser#funcDefn.
    def visitFuncDefn(self, ctx:RelayParser.FuncDefnContext):
        return self.visitChildren(ctx)


    # Visit a parse tree produced by RelayParser#externAdtDefn.
    def visitExternAdtDefn(self, ctx:RelayParser.ExternAdtDefnContext):
        return self.visitChildren(ctx)


    # Visit a parse tree produced by RelayParser#adtDefn.
    def visitAdtDefn(self, ctx:RelayParser.AdtDefnContext):
        return self.visitChildren(ctx)


    # Visit a parse tree produced by RelayParser#constructorName.
    def visitConstructorName(self, ctx:RelayParser.ConstructorNameContext):
        return self.visitChildren(ctx)


    # Visit a parse tree produced by RelayParser#adtConsDefnList.
    def visitAdtConsDefnList(self, ctx:RelayParser.AdtConsDefnListContext):
        return self.visitChildren(ctx)


    # Visit a parse tree produced by RelayParser#adtConsDefn.
    def visitAdtConsDefn(self, ctx:RelayParser.AdtConsDefnContext):
        return self.visitChildren(ctx)


    # Visit a parse tree produced by RelayParser#matchClauseList.
    def visitMatchClauseList(self, ctx:RelayParser.MatchClauseListContext):
        return self.visitChildren(ctx)


    # Visit a parse tree produced by RelayParser#matchClause.
    def visitMatchClause(self, ctx:RelayParser.MatchClauseContext):
        return self.visitChildren(ctx)


    # Visit a parse tree produced by RelayParser#matchType.
    def visitMatchType(self, ctx:RelayParser.MatchTypeContext):
        return self.visitChildren(ctx)


    # Visit a parse tree produced by RelayParser#patternList.
    def visitPatternList(self, ctx:RelayParser.PatternListContext):
        return self.visitChildren(ctx)


187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203
    # Visit a parse tree produced by RelayParser#wildcardPattern.
    def visitWildcardPattern(self, ctx:RelayParser.WildcardPatternContext):
        return self.visitChildren(ctx)


    # Visit a parse tree produced by RelayParser#varPattern.
    def visitVarPattern(self, ctx:RelayParser.VarPatternContext):
        return self.visitChildren(ctx)


    # Visit a parse tree produced by RelayParser#constructorPattern.
    def visitConstructorPattern(self, ctx:RelayParser.ConstructorPatternContext):
        return self.visitChildren(ctx)


    # Visit a parse tree produced by RelayParser#tuplePattern.
    def visitTuplePattern(self, ctx:RelayParser.TuplePatternContext):
204 205 206 207 208 209 210 211 212 213 214 215 216 217 218
        return self.visitChildren(ctx)


    # Visit a parse tree produced by RelayParser#adtCons.
    def visitAdtCons(self, ctx:RelayParser.AdtConsContext):
        return self.visitChildren(ctx)


    # Visit a parse tree produced by RelayParser#adtConsParamList.
    def visitAdtConsParamList(self, ctx:RelayParser.AdtConsParamListContext):
        return self.visitChildren(ctx)


    # Visit a parse tree produced by RelayParser#adtConsParam.
    def visitAdtConsParam(self, ctx:RelayParser.AdtConsParamContext):
219 220 221
        return self.visitChildren(ctx)


222 223 224 225 226 227 228
    # Visit a parse tree produced by RelayParser#argNoAttr.
    def visitArgNoAttr(self, ctx:RelayParser.ArgNoAttrContext):
        return self.visitChildren(ctx)


    # Visit a parse tree produced by RelayParser#argWithAttr.
    def visitArgWithAttr(self, ctx:RelayParser.ArgWithAttrContext):
229 230 231 232 233 234 235 236 237 238 239 240 241
        return self.visitChildren(ctx)


    # Visit a parse tree produced by RelayParser#varList.
    def visitVarList(self, ctx:RelayParser.VarListContext):
        return self.visitChildren(ctx)


    # Visit a parse tree produced by RelayParser#var.
    def visitVar(self, ctx:RelayParser.VarContext):
        return self.visitChildren(ctx)


242 243
    # Visit a parse tree produced by RelayParser#attrSeq.
    def visitAttrSeq(self, ctx:RelayParser.AttrSeqContext):
244 245 246 247 248 249 250 251
        return self.visitChildren(ctx)


    # Visit a parse tree produced by RelayParser#attr.
    def visitAttr(self, ctx:RelayParser.AttrContext):
        return self.visitChildren(ctx)


252 253
    # Visit a parse tree produced by RelayParser#tupleType.
    def visitTupleType(self, ctx:RelayParser.TupleTypeContext):
254 255 256
        return self.visitChildren(ctx)


257 258 259 260 261
    # Visit a parse tree produced by RelayParser#typeParen.
    def visitTypeParen(self, ctx:RelayParser.TypeParenContext):
        return self.visitChildren(ctx)


262 263
    # Visit a parse tree produced by RelayParser#typeCallType.
    def visitTypeCallType(self, ctx:RelayParser.TypeCallTypeContext):
264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286
        return self.visitChildren(ctx)


    # Visit a parse tree produced by RelayParser#typeIdentType.
    def visitTypeIdentType(self, ctx:RelayParser.TypeIdentTypeContext):
        return self.visitChildren(ctx)


    # Visit a parse tree produced by RelayParser#tensorType.
    def visitTensorType(self, ctx:RelayParser.TensorTypeContext):
        return self.visitChildren(ctx)


    # Visit a parse tree produced by RelayParser#funcType.
    def visitFuncType(self, ctx:RelayParser.FuncTypeContext):
        return self.visitChildren(ctx)


    # Visit a parse tree produced by RelayParser#incompleteType.
    def visitIncompleteType(self, ctx:RelayParser.IncompleteTypeContext):
        return self.visitChildren(ctx)


287 288
    # Visit a parse tree produced by RelayParser#typeParamList.
    def visitTypeParamList(self, ctx:RelayParser.TypeParamListContext):
289 290 291
        return self.visitChildren(ctx)


292 293 294 295 296 297 298 299 300 301 302 303
    # Visit a parse tree produced by RelayParser#shapeList.
    def visitShapeList(self, ctx:RelayParser.ShapeListContext):
        return self.visitChildren(ctx)


    # Visit a parse tree produced by RelayParser#meta.
    def visitMeta(self, ctx:RelayParser.MetaContext):
        return self.visitChildren(ctx)


    # Visit a parse tree produced by RelayParser#metaShape.
    def visitMetaShape(self, ctx:RelayParser.MetaShapeContext):
304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343
        return self.visitChildren(ctx)


    # Visit a parse tree produced by RelayParser#parensShape.
    def visitParensShape(self, ctx:RelayParser.ParensShapeContext):
        return self.visitChildren(ctx)


    # Visit a parse tree produced by RelayParser#intShape.
    def visitIntShape(self, ctx:RelayParser.IntShapeContext):
        return self.visitChildren(ctx)


    # Visit a parse tree produced by RelayParser#body.
    def visitBody(self, ctx:RelayParser.BodyContext):
        return self.visitChildren(ctx)


    # Visit a parse tree produced by RelayParser#scalarFloat.
    def visitScalarFloat(self, ctx:RelayParser.ScalarFloatContext):
        return self.visitChildren(ctx)


    # Visit a parse tree produced by RelayParser#scalarInt.
    def visitScalarInt(self, ctx:RelayParser.ScalarIntContext):
        return self.visitChildren(ctx)


    # Visit a parse tree produced by RelayParser#scalarBool.
    def visitScalarBool(self, ctx:RelayParser.ScalarBoolContext):
        return self.visitChildren(ctx)


    # Visit a parse tree produced by RelayParser#ident.
    def visitIdent(self, ctx:RelayParser.IdentContext):
        return self.visitChildren(ctx)



del RelayParser