Skip to content
This repository was archived by the owner on Mar 25, 2025. It is now read-only.
This repository was archived by the owner on Mar 25, 2025. It is now read-only.

Bad error message for invalid local name. #1217

Description

@1uc

The following MOD file:

$ cat invalid_name.mod
NEURON {
    SUFFIX invalid_name
}

INITIAL {
    LOCAL _kf
}

fails as follows:

[NMODL] [info] :: Processing invalid_name.mod
terminate called after throwing an instance of 'std::runtime_error'
  what():  NMODL Parser Error : syntax error, unexpected ., expecting NAME [Location : 6.11]
    LOCAL _kf
----------^

[1]    31242 IOT instruction (core dumped)  nmodl invalid_name.mod

I'd like to highlight that it blames a . when the offending character is a _.

Note that this is the better variation of the error, for intermediate transformations the error might be:

terminate called after throwing an instance of 'std::runtime_error'
  what():  NMODL Parser Error : syntax error, unexpected . [Location : 1.29]
----------------------------^

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions