-
Notifications
You must be signed in to change notification settings - Fork 0
Defining identifier charsets
amomra edited this page Apr 20, 2015
·
2 revisions
Sometimes it is necessary to change the character sets that are used for token identifiers in order to avoid conflicts. The parser uses three different character sets.
- The name character set, is used for:
- function identifiers
- variable identifiers
- constant identifiers
- The operator character set is used for:
- binary operator identifiers
- postfix operator identifiers
- The Infix operator charset is used for infix operator identifiers only
When using the default implementation directly you can skip this section.
parser.NameChars = "0123456789_" +
"abcdefghijklmnopqrstuvwxyz" +
"ABCDEFGHIJKLMNOPQRSTUVWXYZ";
parser.OprtChars = "abcdefghijklmnopqrstuvwxyz" +
"ABCDEFGHIJKLMNOPQRSTUVWXYZ" +
"+-*^/?<>=#!$%&|~'_";
parser.InfixOprtChars = "/+-*^?<>=#!$%&|~'_";
- Getting started
- Setting and evaluating an expression
- Setting the expression
- Single return expression evaluation
- Multiple return expression evaluation
- Bulk mode evaluations
- Error handling
- Defining identifier charsets
- Defining parser variables
- Explicitely defining variables
- Implicit creation of new variables
- Querying parser variables
- Removing variables
- Defining constants
- Defining parser constants
- Querying parser constants
- Removing constants
- Setting custom value recognition callbacks
- Defining functions
- Defining parser functions
- Bulk mode functions
- Defining parser operators
- Unary operators
- Binary operators
- Disable built-in operators
- Localization