Skip to content

BNFC should reject 'bad' filenames names instead of silently sanitizing them #328

@oskarabrahamsson

Description

@oskarabrahamsson

BNFC generates various names (files, directories, classes, ...) based on the filename of the input grammar (e.g. Lang.cf). Not all backends will be able to deal with all legal choices of Lang.cf, however. In those cases, BNFC chooses other names (see e.g. #325 and 22b5483).

I think that BNFC should reject all choices of Lang.cfthat are somehow incompatible with the backend. This behavior would be less surprising, and more in line with how BNFC deals with unsupported names in other situations: for instance, Foo. Foo ::= Bar ; is not legal when using the Java backend, so BNFC rejects it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions