Examples of Token


Examples of org.zkoss.zss.engine.xel.Token

    assertTokenEquals((Token) tokens.get(j++), "operand", "text", "no");
    assertTokenEquals((Token) tokens.get(j++), "function", "stop", "");
    assertTokenEquals((Token) tokens.get(j++), "operator-infix", "concatenate", "&");
    assertTokenEquals((Token) tokens.get(j++), "operand", "text", "  more \"test\" text");
 
    Token root = parser.parse(tokens, null, null);
    assertTokenEquals((Token) root, "operator-infix", "concatenate", "&");
    assertTokenEquals((Token) root.getOperands().get(0), "function", "start", "IF");
    assertTokenEquals((Token) root.getOperands().get(1), "operand", "text", "  more \"test\" text");
  }
View Full Code Here

Examples of parserTXT.Token

    //512,biscoitoGengibre,biscoitoGengibre,0,50,25,1,,,,,,2,,,0,,{ itemheal 25,0; },{}
    Script uso = new Script();
    Script eqp = new Script();
    Comando cmd = new Comando();
    cmd.addToken( new Token(TipoToken.CMD, "itemheal") );
    cmd.addToken( new Token(TipoToken.NUM, "25") );
    cmd.addToken( new Token(TipoToken.NUM, "0") );
    uso.addComando(cmd);
    Object[] item1 = {"512", "biscoitoGengibre", "biscoitoGengibre" , "0", "50", "25" , "1", "", "", "", "", "", "2", "", "", "0", "", uso, eqp};

    //3046,verdadeiroTrevo,Verdadeiro Trevo,5,50000,25000,10,,,,5,0,2,8,,0,0,{},{ bonus bLuk, 10; bonus bMdef, 25; }
    uso = new Script();
    eqp = new Script();
    cmd = new Comando();
    cmd.addToken( new Token(TipoToken.CMD, "bonus") );
    cmd.addToken( new Token(TipoToken.VAR, "bLuk") );
    cmd.addToken( new Token(TipoToken.NUM, "10") );
    eqp.addComando(cmd);
    cmd = new Comando();
    cmd.addToken( new Token(TipoToken.CMD, "bonus") );
    cmd.addToken( new Token(TipoToken.VAR, "bMdef") );
    cmd.addToken( new Token(TipoToken.NUM, "25") );
    eqp.addComando(cmd);
    Object[] item2 = {"3046", "verdadeiroTrevo", "Verdadeiro Trevo", "5", "50000", "25000", "10", "", "", "", "5", "0", "2", "8", "", "0", "0", uso, eqp};

    parser.addItem(new Item(item1));
    parser.addItem(new Item(item2));
View Full Code Here

Examples of persistence.antlr.Token

                    ex);
            }
        }
        else if (ex instanceof MismatchedTokenException) {
            MismatchedTokenException mismatched = (MismatchedTokenException)ex;
            Token token = mismatched.token;
            if (token != null) {
                if (token.getType() == Token.EOF_TYPE) {
                    result = EJBQLException.unexpectedEOF(getQueryInfo(),
                        mismatched.getLine(), mismatched.getColumn(), ex);
                }
                else {
                    result = EJBQLException.syntaxErrorAt(getQueryInfo(),
                        mismatched.getLine(), mismatched.getColumn(),
                        token.getText(), ex);
                }
            }
        }
        else if (ex instanceof NoViableAltException) {
            NoViableAltException noviable = (NoViableAltException)ex;
            Token token = noviable.token;
            if (token != null) {
                if (token.getType() == Token.EOF_TYPE) {
                    result = EJBQLException.unexpectedEOF(getQueryInfo(),
                        noviable.getLine(), noviable.getColumn(), ex);
                }
                else {
                    result = EJBQLException.unexpectedToken(getQueryInfo(),
                        noviable.getLine(), noviable.getColumn(),
                        token.getText(), ex);
                }
            }
        }
        else if (ex instanceof NoViableAltForCharException) {
            NoViableAltForCharException noViableAlt = (NoViableAltForCharException)ex;
View Full Code Here

Examples of ptolemy.data.Token

     * @exception IllegalActionException Not thrown in this base class.
     */
    public void fire() throws IllegalActionException  {
        super.fire();
        if (input.hasToken(0)) {
            Token savedState = _stateVector[_currentTap];
            Token yCurrent = _computeOutput(input.get(0));
            $ASSIGN$_latestWindow(_stateVector[_currentTap]);
            $ASSIGN$_stateVector(_currentTap, savedState);
            output.send(0, yCurrent);
        }
    }
View Full Code Here

Examples of ptolemy.data.expr.Token

        //ptolemy.data.Token result = tokens[0];
        ptolemy.data.Token childToken = _evaluateChild(node, 0);
        result += _childCode;

        for (int i = 1; i < numChildren; i++) {
            Token operator = (Token) lexicalTokenList.get(i - 1);

            if (operator.kind == PtParserConstants.MULTIPLY) {
                //_fireCode.append("*");
                result += "*";
            } else if (operator.kind == PtParserConstants.DIVIDE) {
View Full Code Here

Examples of rabbit.html.Token

  int astart = -1;
 
  List<Token> tokens = block.getTokens ();
  int tsize = tokens.size ();
  for (int i = 0; i < tsize; i++) {
      Token t = tokens.get (i);
      if (t.getType () == TokenType.TAG) {
    Tag tag = t.getTag ();
    TagType tagtype = tag.getTagType ();
    if (tagtype == TagType.A) {
        astart = i;
        Tag atag = tag;
        int ttsize = tokens.size ();
        for (; i < ttsize; i++) {
      Token tk2 = tokens.get (i);
      if (tk2.getType () == TokenType.TAG) {
          Tag tag2 = tk2.getTag ();
          TagType t2tt = tag2.getTagType ();
          if (t2tt != null &&
        t2tt == TagType.SA)
        break;
          else if (t2tt != null &&
View Full Code Here

Examples of scriptingLanguage.Token

   */
  @Override
  public Token eval(AbstractClass<?> caller, Token parameters, AbstractFrame frame) throws ArrayIndexOutOfBoundsException, IllegalArgumentException, InterpreterException {
    int index = (int) ((Variable<Integer>) parameters.getCar()).getSource();
    if ((parameters = parameters.getNextToken()).isNull() || parameters.getCar().equals("get"))
      return new Token(Array.get(getSource(), index), ((Variable<?>) Array.get(getSource(), index)).getType().getTokenType());
    if (parameters.getCar().equals("set")) {
      if (((Variable<?>) (parameters = parameters.getNextToken()).getCar()).getType().extend((AbstractClass<?>) getType().getSource()) == -1)
        throw new InvalidAssignmentException("Cannot assign a value of the type, " + ((Variable<?>) parameters.getCar()).getType() + " to " + getType().getSource());
      Array.set(getSource(), index, parameters.getCar());
      return new Token(Interpreter.NULL, Interpreter.voidType);
    }
    return ((Variable<?>) Array.get(getSource(), index)).eval(caller, parameters, frame);
  }
View Full Code Here

Examples of se.sics.mspsim.extutil.highlight.Token

    nrTokens = cScanner.scan(code.toCharArray(), 0, code.length());

    /* Extract tokens */
    Vector<Token> codeTokensVector = new Vector<Token>();
    for (int i=0; i < nrTokens; i++) {
      Token token = cScanner.getToken(i);
      codeTokensVector.add(token);
    }

    /* Create new line token array */
    Token newTokensArray[][] = new Token[codeData.size()][];
    int[] newTokensStartPos = new int[codeData.size()];
    int lineStart=0, lineEnd=-1;
    Enumeration<Token> tokensEnum = codeTokensVector.elements();
    Token currentToken = tokensEnum.nextElement();
    for (int i=0; i < newTokensArray.length; i++) {
      lineStart = lineEnd + 1;
      lineEnd = lineStart + codeData.get(i).length();

      newTokensStartPos[i] = lineStart;;
View Full Code Here

Examples of securesocial.core.java.Token

        Logger.info("doDeleteExpiredTokens SecureSocial");
        DateTime now = DateTime.now();

        Iterator<Token> iterator = tokens.values().iterator();
        while (iterator.hasNext()) {
            Token token = iterator.next();

            if (now.isAfter(token.getExpirationTime())) {
                iterator.remove();
                Logger.info("Removed token [{}]", token.getUuid());
            }
        }
    }
View Full Code Here

Examples of sicel.compiler.parser.Token

 
  public abstract ASTNode parse( File file );
 
  protected final Token expect( Class<? extends Token> tokenType )
  {
    Token t = lexer.take();
    if( t == null )
    {
      throw new SyntaxError("Unexpected EOF", "", 0, 0);
    }
    if( ! t.getClass().equals( tokenType ) )
    {
      throw new UnexpectedTokenError( t, tokenType );
    }
    return t;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.