parameter file parser aborts when findeing first error

Create issue
Issue #1390 closed
Roland Haas created an issue

The attached parfile contains multiple errors (one per line).

However the parameter file parser only reports the first one, then stops. This makes verifying parfiles for correctness hard. It might be good to defer aborting until the end of the file or until a larger number of parsing errors were encountered.

Keyword:

Comments (11)

  1. Roland Haas reporter
    • removed comment

    This still applies even with the piraha based parser. It is particularly annoying on clusters where one cannot run cactus_sim -S fail.par on the login nodes (eg Cray machines).

  2. Steven R. Brandt
    • removed comment

    I don't know a generic way to recover from a syntax error. My experience is that when compilers try to do this, usually only the first error message is meaningful. I can make specific syntax errors recoverable, however. I could make piraha recover from the specific errors in this file.

  3. Steven R. Brandt
    • removed comment

    Take a look at the multiple_syntax_errors branch of the flesh and see if it does what you want.

  4. Roland Haas reporter
    • removed comment

    You can certainly put it up for review. The review report may or may not be "please apply" in the end (by whoever ends up reviewing it which does not have to be me :-)). For review though please either link the pull request here or provide a diff to look at.

  5. Roland Haas reporter
    • changed status to open
    • removed comment

    I added comments on the code to a pull request for the branch that you can find here: https://bitbucket.org/cactuscode/cactus/pull-requests/37/multiple-syntax-errors-enabled-through-a/diff

    Testing functionality I find that it still aborts after the first error, even for the fail.par file attached in this ticket. In fact I have been unable to make it produce more than one syntax error. Would you be able to provide a parameter file where the change in the code makes a difference, please?

  6. Steven R. Brandt
    • changed status to open
    • removed comment

    Roland, I replied to your comments and issues and pushed a new revision to the branch.

  7. Log in to comment