Typing information for the CST system. The types here are those used by CSTNode, Token, and Reduction.
| Type | Name and description |
|---|---|
static boolean |
canMean(int actual, int preferred)Given two types, returns true if the first can be viewed as the second. |
static String |
getDescription(int type) |
static Collection |
getKeywords()Adds a description to the set. |
static int |
getPrecedence(int type, boolean throwIfInvalid) |
static String |
getText(int type) |
static boolean |
isKeyword(String text) |
static int |
lookup(String text, int filter) |
static int |
lookupKeyword(String text) |
static int |
lookupSymbol(String text) |
static void |
makePostfix(CSTNode node, boolean throwIfInvalid)Adds a element to the TEXTS and LOOKUP. |
static void |
makePrefix(CSTNode node, boolean throwIfInvalid)Returns the type for the specified symbol/keyword text. |
static boolean |
ofType(int specific, int general) |
Given two types, returns true if the first can be viewed as the second. NOTE thatcanMean()is orthogonal toofType().
Adds a description to the set.
Adds a element to the TEXTS and LOOKUP.
Returns the type for the specified symbol/keyword text. Returns UNKNOWN
if the text isn't found. You can filter finds on a type.