Esempio n. 1
0
def main():
    usage = "usage: %prog [options]"
    parser = OptionParser(usage)
    (options, args) = parser.parse_args()

    filename = MCRL2_ROOT + 'doc/specs/mcrl2-syntax.g'
    sections = parse_mcrl2_syntax(filename)
    for (title, productions) in sections:
        print_section(title, productions)
def main():
    usage = "usage: %prog [options]"
    parser = OptionParser(usage)
    (options, args) = parser.parse_args()

    filename = MCRL2_ROOT + 'doc/specs/mcrl2-syntax.g'
    sections = parse_mcrl2_syntax(filename)
    for (title, productions) in sections:
        print_section(title, productions)
Esempio n. 3
0
def generate_code(filename, production_mapping):
    global production_return_types
    production_return_types = {}
    for line in production_mapping.splitlines():
        words = line.split()
        if len(words) == 1:
            production_return_types[words[0]] = 'UNKNOWN'
        elif len(words) == 2:
            production_return_types[words[0]] = words[1]


    sections = parse_mcrl2_syntax(filename)
    sections = post_process_sections(sections)
    for (title, productions) in sections:
        print_section(title, productions)