public class SemanticPredicates extends Object
Some semantic predicates for altering the behaviour of the lexer and parser
Type Params | Return Type | Name and description |
---|---|---|
|
static boolean |
isFollowedBy(CharStream cs, char chars) |
|
static boolean |
isFollowedByJavaLetterInGString(CharStream cs) |
|
static boolean |
isFollowedByWhiteSpaces(CharStream cs) |
|
static boolean |
isFollowingArgumentsOrClosure(ExpressionContext context) Check whether following a method name of command expression. |
|
static boolean |
isInvalidLocalVariableDeclaration(TokenStream ts) Distinguish between local variable declaration and method call, e.g. |
|
static boolean |
isInvalidMethodDeclaration(TokenStream ts) Distinguish between method declaration and method call/constructor declaration |
Check whether following a method name of command expression. Method name should not end with "2: arguments" and "3: closure"
context
- the preceding expressionDistinguish between local variable declaration and method call, e.g. `a b`
Distinguish between method declaration and method call/constructor declaration