private static Token fakeTokenForLocation(RecognitionException e) { ClassicToken t = new ClassicToken(Token.INVALID_TOKEN_TYPE); t.setLine(e.line); t.setCharPositionInLine(e.charPositionInLine); t.setText(""); // dummy text determining next col; TODO improve return t; }
public static TokenStreamFragment fromSingleToken(String token) { return fromTokens(Arrays.asList((Token) new ClassicToken(1, token))); }
public StringLiteral( String value ) { super( new ClassicToken( 1, value ) ); parseValue( value ); }
public UUIDLiteral( UUID value ) { super( new ClassicToken( 0, String.valueOf( value ) ) ); this.value = value; }
public Equal() { super( new ClassicToken( 0, "=" ) ); }
/** * * @param value */ public LongLiteral( long value ) { super( new ClassicToken( 0, String.valueOf( value ) ) ); this.value = value; }
public FloatLiteral( float f ) { super( new ClassicToken( 0, String.valueOf( f ) ) ); value = f; }
public Property( String property ) { this( new ClassicToken( 1, property ) ); }
/** The boolean literal */ public BooleanLiteral( boolean value ) { super( new ClassicToken( 0, String.valueOf( value ) ) ); this.value = value; }
public ContainsProperty( String property ) { this( new ClassicToken( 0, property ) ); }
public WithinProperty( String property ) { this( new ClassicToken( 0, property ) ); }