Package org.apache.groovy.parser.antlr4
Class SemanticPredicates
- java.lang.Object
- 
- org.apache.groovy.parser.antlr4.SemanticPredicates
 
- 
 public class SemanticPredicates extends Object Some semantic predicates for altering the behaviour of the lexer and parser
- 
- 
Constructor SummaryConstructors Constructor Description SemanticPredicates()
 - 
Method SummaryAll Methods Static Methods Concrete Methods Modifier and Type Method Description static booleanisFollowedBy(org.antlr.v4.runtime.CharStream cs, char... chars)static booleanisFollowedByJavaLetterInGString(org.antlr.v4.runtime.CharStream cs)static booleanisFollowedByWhiteSpaces(org.antlr.v4.runtime.CharStream cs)static booleanisFollowingArgumentsOrClosure(GroovyParser.ExpressionContext context)Check whether following a method name of command expression.static booleanisInvalidLocalVariableDeclaration(org.antlr.v4.runtime.TokenStream ts)Distinguish between local variable declaration and method call, e.g.static booleanisInvalidMethodDeclaration(org.antlr.v4.runtime.TokenStream ts)Distinguish between method declaration and method call/constructor declaration
 
- 
- 
- 
Method Detail- 
isFollowedByWhiteSpacespublic static boolean isFollowedByWhiteSpaces(org.antlr.v4.runtime.CharStream cs) 
 - 
isFollowedBypublic static boolean isFollowedBy(org.antlr.v4.runtime.CharStream cs, char... chars)
 - 
isFollowedByJavaLetterInGStringpublic static boolean isFollowedByJavaLetterInGString(org.antlr.v4.runtime.CharStream cs) 
 - 
isFollowingArgumentsOrClosurepublic static boolean isFollowingArgumentsOrClosure(GroovyParser.ExpressionContext context) Check whether following a method name of command expression. Method name should not end with "2: arguments" and "3: closure"- Parameters:
- context- the preceding expression
 
 - 
isInvalidMethodDeclarationpublic static boolean isInvalidMethodDeclaration(org.antlr.v4.runtime.TokenStream ts) Distinguish between method declaration and method call/constructor declaration
 - 
isInvalidLocalVariableDeclarationpublic static boolean isInvalidLocalVariableDeclaration(org.antlr.v4.runtime.TokenStream ts) Distinguish between local variable declaration and method call, e.g. `a b`
 
- 
 
-