예제 #1
0
 def __init__(self, grammar=None, root_node="vrmlScene"):
     path = os.path.abspath(os.path.dirname(__file__))
     if not grammar:
         grammar_file = os.path.join(path, "vrml.sbnf")
         # print("Using grammar {0}".format(grammar_file))
         grammar = open(grammar_file).read()
     #logger.info("Grammar: {0}".format(grammar))
     Parser.__init__(self, grammar, root_node)
     logging.debug("created parser instance")
     self.root_path = ""
     self.prototypes = {}
     spec_data = open(os.path.join(path, 'standard_nodes.wrl')).read()
     self.parse(spec_data)
     logging.debug("Parsed vrml2.0 specs")
예제 #2
0
 def __init__(self, grammar = None, root_node = "vrmlScene"):
     path = os.path.abspath(os.path.dirname(__file__))
     if not grammar:
         grammar_file = os.path.join(path,"vrml.sbnf" )
         # print("Using grammar {0}".format(grammar_file))
         grammar = open(grammar_file).read()
     #logger.info("Grammar: {0}".format(grammar))
     Parser.__init__(self, grammar, root_node)
     logging.debug("created parser instance")
     self.root_path = ""
     self.prototypes = {}
     spec_data = open(os.path.join(path, 'standard_nodes.wrl')).read()
     self.parse(spec_data)
     logging.debug("Parsed vrml2.0 specs")
예제 #3
0
 def __init__(self, filedef=transit_file_def, verbosity=1):
     Parser.__init__(self, filedef)
     self.verbosity = verbosity
     self.tfp = TransitFileProcessor(self.verbosity)
예제 #4
0
 def __init__(self, *arg):
     Parser.__init__(self, *arg)
     self.res = {}
예제 #5
0
 def __init__(self, *arg):
     Parser.__init__(self, *arg)
     self.res = {}
예제 #6
0
 def __init__(self, *args, **kwargs):
     Parser.__init__(self, *args, **kwargs)
     self.shape = kinematics.Shape()
예제 #7
0
 def __init__(self, filedef=transit_file_def, verbosity=1):
     Parser.__init__(self, filedef)
     self.verbosity=verbosity
     self.tfp = TransitFileProcessor(self.verbosity)
예제 #8
0
파일: calc.py 프로젝트: maffe/anna
 def __init__(self, root='expression', *args):
     Parser.__init__(self, open(DEFINITIONS, 'r').read(), root, *args)
예제 #9
0
 def __init__(self, *args, **kwargs):
     Parser.__init__(self,*args, **kwargs)
     self.shape = kinematics.Shape()