Mercurial > lcfOS
comparison python/yacc.py @ 340:c7cc54c0dfdf devel
Test featurebranch
author | Windel Bouwman |
---|---|
date | Sun, 23 Feb 2014 16:24:01 +0100 |
parents | 6f4753202b9a |
children | 86b02c98a717 |
comparison
equal
deleted
inserted
replaced
339:6ee17c4dd6b8 | 340:c7cc54c0dfdf |
---|---|
207 def generate(self, grammar, headers, output_file): | 207 def generate(self, grammar, headers, output_file): |
208 self.output_file = output_file | 208 self.output_file = output_file |
209 self.grammar = grammar | 209 self.grammar = grammar |
210 self.headers = headers | 210 self.headers = headers |
211 self.logger.info('Generating parser for grammar {}'.format(grammar)) | 211 self.logger.info('Generating parser for grammar {}'.format(grammar)) |
212 self.action_table, self.goto_table = grammar.doGenerate() | 212 self.action_table, self.goto_table = grammar.generate_tables() |
213 self.generate_python_script() | 213 self.generate_python_script() |
214 | 214 |
215 def print(self, *args): | 215 def print(self, *args): |
216 """ Print helper function that prints to output file """ | 216 """ Print helper function that prints to output file """ |
217 print(*args, file=self.output_file) | 217 print(*args, file=self.output_file) |