Package org.eclipse.php.internal.core.documentModel.parser

Examples of org.eclipse.php.internal.core.documentModel.parser.AbstractPhpLexer.initialize()


                        phpVersion);
                int inScriptingState = lexer.getClass()
                    .getField("ST_PHP_IN_SCRIPTING")
                    .getInt(lexer); // different lexers have
                            // different state codes
                lexer.initialize(inScriptingState);

                StringBuilder actualBuf = new StringBuilder();
                String tokenType = lexer.yylex();
                while (tokenType != null) {
                  actualBuf.append(tokenType).append('|')
View Full Code Here


   */
  private AbstractPhpLexer getPhpLexer(Reader stream, LexerState startState) {
    final PHPVersion phpVersion = ProjectOptions.getPhpVersion(project);
    final AbstractPhpLexer lexer = PhpLexerFactory.createLexer(stream,
        phpVersion);
    lexer.initialize(ST_PHP_IN_SCRIPTING);
    lexer.setPatterns(project);

    // set the wanted state
    if (startState != null) {
      startState.restoreState(lexer);
View Full Code Here

        phpVersion = PHPVersion.getLatestVersion();
      }

      AbstractPhpLexer lexer = PhpLexerFactory.createLexer(
          new StringReader(textSequence.toString()), phpVersion);
      lexer.initialize(lexer.getScriptingState());
      String symbol = null;
      int level = 0;
      int argIndex = 0;
      do {
        try {
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.