Is it possible to parse a non-symbolic operator (e.g., AND, OR) case-insensitively using OperatorPrecedenceParser?
Is it possible to parse a non-symbolic operator (e.g., AND , OR ) case-insensitively
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The OperatorPrecedenceParser has no built-in support for case insensitive matching of non-symbolic operators.
However, if your non-symbolic operators are short or you only have to support a few spelling variants (e.g. all lowercase, all uppercase, only first char uppercase, …) then you can simply add all variants of the operator that you need to support. (Of course, you’d add the variants with a little helper function, not manually.)