Skip to content

Case-insensitive parsing and validation. #51

Open
@robertodr

Description

@robertodr

As pointed out by @stigrj it would be good to not force case-sensitivity upon the users. I see some options:

  1. Do it before we parse. This would mean the programmer using the library has to normalize the case of the input file and the validation template has to adhere to this choice. That is, if normalization is uppercase (lowercase), then validation template use uppercase (lowercase).
  2. As point 1, but we add an option to the api.lex (and expose it in the CLI). Something like --case upper (--case lower)
  3. We let the grammar take care of case normalization, by adding a parse action to the various tokens. In case we change the parsing library (from pyparsing to lark, for example) this will not carry through.
  4. We do case normalization at the validation level. I think this is the most invasive option of all.

Metadata

Metadata

Assignees

No one assigned

    Labels

    RFCPlanning and design discussionsenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions