gtpc2mjw | C/C++ Language Support User's Guide |
There are four options that affect the way that the parser matches a grammar to an input string:
IPRSE_NOSTRICT
IPRSE_STRICT
IPRSE_NOMIXED_CASE
IPRSE_MIXED_CASE
The IPRSE_NOSTRICT option is compatible with the assembler parser (see the BPKDC and BPPSC macros in TPF General Macros) in terms of the characters that are used to separate parameters from each other, and to separate keywords from values. The IPRSE_STRICT option restricts the number of characters that are interpreted as special characters, allowing more characters to be used for parameters (see Special Characters for Input String Syntax). For example, using the IPRSE_NOSTRICT option, the input string "a=b/c,d" is parsed into three separate tokens:
Using the IPRSE_STRICT option, the same input is parsed as a single token.
The IPRSE_NOMIXED_CASE option is used when the input string contains only uppercase letters. If the input string can contain lower case letters you must specify the IPRSE_MIXED_CASE option.
You can specify these options when you call the IPRSE_parse function (see IPRSE_parse-Parse a Text String against a Grammar). You also can specify these options at the beginning of the grammar (see Specifying Parser Options in the Grammar). Options specified in the grammar override options specified when you call the IPRSE_parse function. The effects of these options are described in detail in the following sections.