def build(self, **kwargs):
""" the start attribute is mandatory !
When calling the method with a start distinct from expression you may get the following message
WARNING: Symbol 'expression' is unreachable
Nothing to be aware of
"""
# keep track of
# # start the parser
# start = 'expression'
# if 'start' in kwargs.keys(): # MANDATORY
# start = kwargs['start']
# kwargs.pop('start', None)
# debugging and logging http://www.dabeaz.com/ply/ply.html#ply_nn44
#self.parser = yacc.yacc(module=self, start=start, errorlog=yacc.NullLogger(), debug = False, **kwargs)
self.parser = yacc.yacc(module=self, start='step', errorlog=yacc.NullLogger(), debug = False, **kwargs)
# https://github.com/dabeaz/ply/blob/master/ply/yacc.py
# debug yaccdebug = True # Debugging mode. If set, yacc generates a
# a 'parser.out' file in the current directory
# """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
# MAIN
# """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
# example use:
评论列表
文章目录