Property | Type | Description | |
---|---|---|---|
PredefinedInfixPrecedence | Precedence>.Map | ||
PredefinedPrefixPrecedence | Precedence>.Map | ||
PredefinedSuffixPrecedence | Precedence>.Map |
Method | Description | |
---|---|---|
Find ( OperatorShape shape, object op, bool cacheWordOp = true, bool les3InfixOp = false ) : Precedence |
Gets the precedence in LES of a prefix, suffix, or infix operator.
|
|
IsExtendedOperator ( string name, string expectPrefix = "'" ) : bool |
Returns true if the given Symbol can ever be used as an "extended" binary operator in LESv3. A binary operator's length must be between 2 and 255, its name must start with an apostrophe, and each remaining character must be punctuation marks from natural operators and/or characters from the set {'#', '_', 'a'..'z', 'A'..'Z', '0'..'9', '$'}. |
|
IsNaturalOperator ( string name ) : bool |
Returns true if the given Symbol can be printed as an operator without escaping it in LESv2. The parser should read something like |
|
IsOpChar ( char c ) : bool |
Returns true if this character is one of those that operators are normally made out of in LES.
|
|
IsOpCharEx ( char c ) : bool |
Returns true if this character is one of those that can appear in "extended" LESv3 operators that start with an apostrophe.
|
|
IsSuffixOperatorName ( Symbol name, Symbol &bareName, bool checkNatural ) : bool |
Decides whether the name appears to represent a suffix operator of the form
|
|
LesPrecedenceMap ( ) : System | ||
Reset ( ) : void |
Forgets previously encountered operators to save memory.
|
|
ToSuffixOpName ( object symbol ) : Symbol |
Given a normal operator symbol like op must be a Symbol, but the parameter has type object to avoid casting Token.Value in the parser. |
Method | Description | |
---|---|---|
FindPrecedence ( Precedence>.MMap |
Method | Description | |
---|---|---|
GetOpChars ( ) : |
||
GetOpCharsEx ( ) : |
||
IsOperator ( string name, |
||
this ( OperatorShape s ) : Pair |
public Find ( OperatorShape shape, object op, bool cacheWordOp = true, bool les3InfixOp = false ) : Precedence | ||
shape | OperatorShape | Specifies which precedence table and rules to use
/// (Prefix, Suffix or Infix). Note: when this is Suffix, "suf" must not be
/// part of the name in |
op | object | Parsed form of the operator. op must be a Symbol, but /// the parameter has type object to avoid casting Token.Value in the parser. |
cacheWordOp | bool | |
les3InfixOp | bool | |
return | Precedence |
protected FindPrecedence ( Precedence>.MMap | ||
table | Precedence>.MMap | |
symbol | object | |
@default | Precedence | |
cacheWordOp | bool | |
les3InfixOp | bool | |
return | Precedence |
public static IsExtendedOperator ( string name, string expectPrefix = "'" ) : bool | ||
name | string | |
expectPrefix | string | |
return | bool |
public static IsNaturalOperator ( string name ) : bool | ||
name | string | |
return | bool |
public static IsSuffixOperatorName ( Symbol name, Symbol &bareName, bool checkNatural ) : bool | ||
name | Symbol | Potential operator name to evaluate. |
bareName | Symbol | If the name ends with "suf", this is the same
/// name without "suf", otherwise it is set to |
checkNatural | bool | If true, part of the requirement for /// returning true will be that IsNaturalOperator(bareName) == true. |
return | bool |
public ToSuffixOpName ( object symbol ) : Symbol | ||
symbol | object | |
return | Symbol |
protected static Map PredefinedInfixPrecedence | ||
return | Precedence>.Map |
protected static Map PredefinedPrefixPrecedence | ||
return | Precedence>.Map |