def build_model_parser(self, store, modules): """ Builder parser that parses model written in QoPML and populates the store. """ from aqopa.model.parser.lex_yacc import LexYaccParser from aqopa.model.parser.lex_yacc.grammar import main,\ functions, channels, equations, expressions, instructions,\ hosts, modules as modules_module parser = LexYaccParser() parser.set_store(store) \ .add_extension(main.ModelParserExtension()) \ .add_extension(modules_module.ModelParserExtension()) \ .add_extension(functions.ModelParserExtension()) \ .add_extension(channels.ModelParserExtension()) \ .add_extension(equations.ModelParserExtension()) \ .add_extension(expressions.ModelParserExtension()) \ .add_extension(instructions.ModelParserExtension()) \ .add_extension(hosts.ModelParserExtension()) for m in modules: parser = m.extend_model_parser(parser) return parser.build()
def build_model_parser(self, store, modules): """ Builder parser that parses model written in QoPML and populates the store. """ from aqopa.model.parser.lex_yacc import LexYaccParser from aqopa.model.parser.lex_yacc.grammar import main,\ functions, channels, equations, expressions, instructions,\ hosts, modules as modules_module, communication as comm_grammar parser = LexYaccParser() parser.set_store(store) \ .add_extension(main.ModelParserExtension()) \ .add_extension(modules_module.ModelParserExtension()) \ .add_extension(functions.ModelParserExtension()) \ .add_extension(channels.ModelParserExtension()) \ .add_extension(equations.ModelParserExtension()) \ .add_extension(expressions.ModelParserExtension()) \ .add_extension(comm_grammar.ModelParserExtension()) \ .add_extension(algorithms.ModelParserExtension()) \ .add_extension(instructions.ModelParserExtension()) \ .add_extension(hosts.ModelParserExtension()) for m in modules: parser = m.extend_model_parser(parser) return parser.build()
def build_config_parser(self, store, modules): """ Builder parser that parses config written in QoPML and populates the store. """ from aqopa.model.parser.lex_yacc import LexYaccParser from aqopa.model.parser.lex_yacc.grammar import versions, main parser = LexYaccParser() parser.set_store(store)\ .add_extension(main.ConfigParserExtension())\ .add_extension(versions.ConfigParserExtension()) for m in modules: parser = m.extend_config_parser(parser) return parser.build()
def build_metrics_parser(self, store, modules): """ Builder parser that parses metrics written in QoPML and populates the store. """ from aqopa.model.parser.lex_yacc import LexYaccParser from aqopa.model.parser.lex_yacc.grammar import main, metrics parser = LexYaccParser() parser.set_store(store)\ .add_extension(main.MetricsParserExtension())\ .add_extension(metrics.MetricsParserExtension()) for m in modules: parser = m.extend_metrics_parser(parser) return parser.build()
def build_metrics_parser(self, store, modules): """ Builder parser that parses metrics written in QoPML and populates the store. """ from aqopa.model.parser.lex_yacc import LexYaccParser from aqopa.model.parser.lex_yacc.grammar import main, metrics as metrics_grammar parser = LexYaccParser() parser.set_store(store)\ .add_extension(main.MetricsParserExtension())\ .add_extension(metrics_grammar.MetricsParserExtension()) for m in modules: parser = m.extend_metrics_parser(parser) return parser.build()
def build_config_parser(self, store, modules): """ Builder parser that parses config written in QoPML and populates the store. """ from aqopa.model.parser.lex_yacc import LexYaccParser from aqopa.model.parser.lex_yacc.grammar import versions, main, communication as comm_grammar parser = LexYaccParser() parser.set_store(store)\ .add_extension(main.ConfigParserExtension())\ .add_extension(comm_grammar.ConfigParserExtension()) \ .add_extension(versions.ConfigParserExtension()) for m in modules: parser = m.extend_config_parser(parser) return parser.build()