Examples of TokenType


Examples of org.apache.xmlbeans.XmlCursor.TokenType

        for ( ; ; )
        {
            Assert.assertTrue( cFrom.comparePosition( cTo ) == 0 );
            Assert.assertTrue( cFrom.isAtSamePositionAs( cTo ) );

            TokenType tt = cFrom.currentTokenType();
           
            if (tt == TokenType.ENDDOC)
            {
                break;
            }
View Full Code Here

Examples of org.apache.xmlbeans.XmlCursor.TokenType

    }

    public TokenType _prevTokenType() {
        _cur.push();

        TokenType tt = _toPrevToken();

        _cur.pop();

        return tt;
    }
View Full Code Here

Examples of org.jboss.aesh.extensions.text.highlight.TokenType

        String last_token = null;
        boolean import_clause = false;
        boolean class_name_follows = false;
        boolean after_def = false;
        boolean value_expected = true;
        TokenType kind = null;

        while (source.hasMore()) {
            MatchResult m = null;

            switch (state) {
View Full Code Here

Examples of org.jboss.aesh.extensions.text.highlight.TokenType

    @Override
    public void scan(StringScanner source, Encoder encoder, Map<String, Object> options) {
        State state = State.initial;
        String string_delimiter = null;
        TokenType package_name_expected = null;
        boolean class_name_follows = false;
        boolean last_token_dot = false;

        while (source.hasMore()) {
            MatchResult m = null;

            switch (state) {
                case initial:
                    if ((m = source.scan(SPACE)) != null) {
                        encoder.textToken(m.group(), TokenType.space);
                        continue;
                    } else if ((m = source.scan(COMMENT)) != null) {
                        encoder.textToken(m.group(), TokenType.comment);
                        continue;
                    } else if (package_name_expected != null && (m = source.scan(PACKAGE)) != null) {
                        encoder.textToken(m.group(), package_name_expected);
                    } else if ((m = source.scan(IDENT_OR_ARRAY_TYPE)) != null) {
                        String match = m.group();
                        TokenType kind = IDENT_KIND.lookup(match);
                        if (last_token_dot) {
                            kind = TokenType.ident;
                        } else if (class_name_follows) {
                            kind = TokenType.class_;
                            class_name_follows = false;
View Full Code Here

Examples of org.jboss.aesh.extensions.text.highlight.TokenType

                        encoder.textToken(m.group(), TokenType.operator);
                    } else if ((m = source.scan(OPERATOR_END)) != null) {
                        function_expected = key_expected = value_expected = false;
                        encoder.textToken(m.group(), TokenType.operator);
                    } else if ((m = source.scan(IDENT)) != null) {
                        TokenType kind = IDENT_KIND.lookup(m.group());
                        value_expected = (kind == TokenType.keyword) && KEYWORDS_EXPECTING_VALUE.lookup(m.group());
                        if (TokenType.ident == kind) {
                            if (m.group().indexOf("$") != -1) {
                                kind = TokenType.predefined;
                            } else if (function_expected) {
View Full Code Here

Examples of org.jboss.forge.addon.text.highlight.TokenType

   @Override
   public void scan(StringScanner source, Encoder encoder, Map<String, Object> options)
   {
      State state = State.initial;
      String string_delimiter = null;
      TokenType package_name_expected = null;
      boolean class_name_follows = false;
      boolean last_token_dot = false;

      while (source.hasMore())
      {
         MatchResult m = null;

         switch (state)
         {
         case initial:
            if ((m = source.scan(SPACE)) != null)
            {
               encoder.textToken(m.group(), TokenType.space);
               continue;
            }
            else if ((m = source.scan(COMMENT)) != null)
            {
               encoder.textToken(m.group(), TokenType.comment);
               continue;
            }
            else if (package_name_expected != null && (m = source.scan(PACKAGE)) != null)
            {
               encoder.textToken(m.group(), package_name_expected);
            }
            else if ((m = source.scan(IDENT_OR_ARRAY_TYPE)) != null)
            {
               String match = m.group();
               TokenType kind = IDENT_KIND.lookup(match);
               if (last_token_dot)
               {
                  kind = TokenType.ident;
               }
               else if (class_name_follows)
View Full Code Here

Examples of org.jboss.forge.addon.text.highlight.TokenType

               function_expected = key_expected = value_expected = false;
               encoder.textToken(m.group(), TokenType.operator);
            }
            else if ((m = source.scan(IDENT)) != null)
            {
               TokenType kind = IDENT_KIND.lookup(m.group());
               value_expected = (kind == TokenType.keyword) && KEYWORDS_EXPECTING_VALUE.lookup(m.group());
               if (TokenType.ident == kind)
               {
                  if (m.group().indexOf("$") != -1)
                  {
View Full Code Here

Examples of org.jboss.forge.addon.text.highlight.TokenType

      String last_token = null;
      boolean import_clause = false;
      boolean class_name_follows = false;
      boolean after_def = false;
      boolean value_expected = true;
      TokenType kind = null;

      while (source.hasMore())
      {
         MatchResult m = null;
View Full Code Here

Examples of org.openjena.riot.tokens.TokenType

                    if ( ch3 == ch )
                    {
                        // """-strings/'''-strings
                        reader.readChar() ;
                        token.setImage(readLong(ch, false)) ;
                        TokenType tt = (ch == CH_QUOTE1) ? TokenType.LONG_STRING1 : TokenType.LONG_STRING2 ;
                        token.setType(tt) ;
                        return token ;
                    }
                    // Two quotes then a non-quote.
                    // Must be '' or ""
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.