The following is a list of all the keyword, operators, rules etc… that are available in the GLASS language.
Operator / Keyword | Description & Example Usage |
---|---|
WORD
|
Use the WORD operator to search for a specific data pattern. A location will be returned as a match if the data pattern is found in the location. Example Usage
|
RANGE
|
Use the RANGE operator to search for N number (TIMES) of characters from a specific set of characters. A location will be marked as a match if N characters from the defined range are found in the location. Example Usage
|
GROUP
|
Use the GROUP (LIST) operator to search for any element from a set of words (or data patterns) that are defined in a MAP namespace. A location will be marked as a match if any of the data patterns defined in the namespace is found in the location. Example Usage
|
THEN and OR
|
All base patterns (e.g. WORD, GROUP, RANGE) in a GLASS data type must be connected to another component (or group of components). Two or more components can be joined in:
Example Usage
|
ALIAS and REFER
|
Use the ALIAS operator to create a set of reusable GLASS expressions that can be referenced in multiple places using the REFER operator. Example Usage
|
MAP
|
In GLASS, namespaces are defined with the MAP operator and have the following properties:
Example Usage
|
BOUND
|
Pattern boundaries let you define the content that the must be found before (BOUND LEFT), after (BOUND RIGHT), or surrounding (BOUND) a search pattern (WORD, RANGE, or GROUP) for it to be a match. Example Usage
|
REQUIRE
|
Applying a REQUIRE rule to a base pattern instructs the GLASS engine to report a match only if the base pattern is explicitly represented in the selected [MAP] namespace(s). [MAP]: ../reference/map.html Example Usage
|
EXCLUDE
|
Applying an EXCLUDE rule to a base pattern instructs the GLASS engine to exclude a pattern from being reported as a match if it is represented in the selected [MAP] namespace(s). [MAP]: ../reference/map.html Example Usage
|
CHECK
|
Use the CHECK rule to instruct the GLASS engine to run each potential match through a specific algorithm as a form of validation to reduce or eliminate false positive matches. A location is only returned as a match if it passes the checksum module that is applied to the GLASS expression(s). Example Usage
|
CONTEXT and APPLY
|
Contextual matching (CONTEXT and APPLY) is an efficient way to specify a set of contextual keywords which when present, determines whether the GLASS engine reports or ignores a potential match. Example Usage
|
DECLARE and CALL
|
Use the DECLARE operator to create parameterized pieces of GLASS code that can form complex, context-specific expressions from simple and easy-to-understand base expressions. These parameterized blocks of code can be referenced in multiple places using the CALL operator. Example Usage
|
RANK and SCORE
|
The GLASS language has two operators that allow the expression writer to influence the score for the rule: RANK and SCORE. Both RANK and SCORE operators work with the concept of namespaces. These namespaces are distinct from the mapping operator namespaces (MAP) and are used to define a name for a set of scores. Example Usage
|
LABEL
|
One or more expressions can form a rule that determines whether the input data matches or not. Whenever a rule generates a match, the engine will report this match. When this reporting happens, it is helpful to identify what rule has matched. This can be done with the LABEL operator. Example Usage
|
MARK
|
The MARK operator will instruct the engine to report only the <left pattern> that matched; the <right pattern> that matched will not be reported. Example Usage
|