Skip to content

Extending the parser to more handwritten files #1

@aurelien-naldi

Description

@aurelien-naldi

The current parser works well with the bnd/cfg files generated by GINsim, but fails on many handwritten files. Supporting all of MaBoSS syntax is a complex task, beyond the scope of the current parser, but we can handle a few more cases with minimal work.

  • The "node" keyword should ignore case
  • node.istate should work with "true" and "false" keywords
  • variable assignments can be more complex than a simple value (1/5 instead of 0.2 is common)

The first two are easy to fix (pull request is following). For the variable assignment, it may be simpler to just store the value as string without trying to interpret it (it can depend on another variable): are there some parts of the code where we need to work with these values?

My last problem is that the current parser will ignore silently everything that appears after an unrecognized line: it should try to parse the remaining and show a warning message, maybe keep the failed lines as string to be able to write them in print_cfg() anyway.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions