com.caucho.quercus.lib
Class TokenModule

java.lang.Object
  extended by com.caucho.quercus.module.AbstractQuercusModule
      extended by com.caucho.quercus.lib.TokenModule
All Implemented Interfaces:
QuercusModule

public class TokenModule
extends AbstractQuercusModule

Quercus tokenizer


Field Summary
static int T_ABSTRACT
           
static int T_AND_EQUAL
           
static int T_ARRAY
           
static int T_ARRAY_CAST
           
static int T_AS
           
static int T_BAD_CHARACTER
           
static int T_BOOL_CAST
           
static int T_BOOLEAN_AND
           
static int T_BOOLEAN_OR
           
static int T_BREAK
           
static int T_CASE
           
static int T_CATCH
           
static int T_CHARACTER
           
static int T_CLASS
           
static int T_CLASS_C
           
static int T_CLONE
           
static int T_CLOSE_TAG
           
static int T_COMMENT
           
static int T_CONCAT_EQUAL
           
static int T_CONST
           
static int T_CONSTANT_ENCAPSED_STRING
           
static int T_CONTINUE
           
static int T_CURLY_OPEN
           
static int T_DEC
           
static int T_DECLARE
           
static int T_DEFAULT
           
static int T_DIV_EQUAL
           
static int T_DNUMBER
           
static int T_DO
           
static int T_DOC_COMMENT
           
static int T_DOLLAR_OPEN_CURLY_BRACES
           
static int T_DOUBLE_ARROW
           
static int T_DOUBLE_CAST
           
static int T_DOUBLE_COLON
           
static int T_ECHO
           
static int T_ELSE
           
static int T_ELSEIF
           
static int T_EMPTY
           
static int T_ENCAPSED_AND_WHITESPACE
           
static int T_END_HEREDOC
           
static int T_ENDDECLARE
           
static int T_ENDFOR
           
static int T_ENDFOREACH
           
static int T_ENDIF
           
static int T_ENDSWITCH
           
static int T_ENDWHILE
           
static int T_EVAL
           
static int T_EXIT
           
static int T_EXTENDS
           
static int T_FILE
           
static int T_FINAL
           
static int T_FOR
           
static int T_FOREACH
           
static int T_FUNC_C
           
static int T_FUNCTION
           
static int T_GLOBAL
           
static int T_HALT_COMPILER
           
static int T_IF
           
static int T_IMPLEMENTS
           
static int T_INC
           
static int T_INCLUDE
           
static int T_INCLUDE_ONCE
           
static int T_INLINE_HTML
           
static int T_INSTANCEOF
           
static int T_INT_CAST
           
static int T_INTERFACE
           
static int T_IS_EQUAL
           
static int T_IS_GREATER_OR_EQUAL
           
static int T_IS_IDENTICAL
           
static int T_IS_NOT_EQUAL
           
static int T_IS_NOT_IDENTICAL
           
static int T_IS_SMALLER_OR_EQUAL
           
static int T_ISSET
           
static int T_LINE
           
static int T_LIST
           
static int T_LNUMBER
           
static int T_LOGICAL_AND
           
static int T_LOGICAL_OR
           
static int T_LOGICAL_XOR
           
static int T_MINUS_EQUAL
           
static int T_ML_COMMENT
           
static int T_MOD_EQUAL
           
static int T_MUL_EQUAL
           
static int T_NEW
           
static int T_NUM_STRING
           
static int T_OBJECT_CAST
           
static int T_OBJECT_OPERATOR
           
static int T_OLD_FUNCTION
           
static int T_OPEN_TAG
           
static int T_OPEN_TAG_WITH_ECHO
           
static int T_OR_EQUAL
           
static int T_PAAMAYIM_NEKUDOTAYIM
           
static int T_PLUS_EQUAL
           
static int T_PRINT
           
static int T_PRIVATE
           
static int T_PROTECTED
           
static int T_PUBLIC
           
static int T_REQUIRE
           
static int T_REQUIRE_ONCE
           
static int T_RETURN
           
static int T_SL
           
static int T_SL_EQUAL
           
static int T_SR
           
static int T_SR_EQUAL
           
static int T_START_HEREDOC
           
static int T_STATIC
           
static int T_STRING
           
static int T_STRING_CAST
           
static int T_STRING_VARNAME
           
static int T_SWITCH
           
static int T_THROW
           
static int T_TRY
           
static int T_UNSET
           
static int T_UNSET_CAST
           
static int T_USE
           
static int T_VAR
           
static int T_VARIABLE
           
static int T_WHILE
           
static int T_WHITESPACE
           
static int T_XOR_EQUAL
           
 
Fields inherited from class com.caucho.quercus.module.AbstractQuercusModule
PHP_INI_ALL, PHP_INI_PERDIR, PHP_INI_SYSTEM, PHP_INI_USER
 
Constructor Summary
TokenModule()
           
 
Method Summary
 IniDefinitions getIniDefinitions()
          Returns the default php.ini values.
 java.lang.String[] getLoadedExtensions()
          Returns the extensions loaded by the module.
static Value highlight_file(Env env, StringValue filename, boolean isReturn)
           
static Value highlight_string(Env env, StringValue s, boolean isReturn)
           
static ArrayValue token_get_all(Env env, StringValue s)
          Parses the string.
static java.lang.String token_name(int token)
          Returns the token name for th egiven token.
 
Methods inherited from class com.caucho.quercus.module.AbstractQuercusModule
addConstant, addConstant, addConstant, getConstMap
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

T_ABSTRACT

public static final int T_ABSTRACT
See Also:
Constant Field Values

T_AND_EQUAL

public static final int T_AND_EQUAL
See Also:
Constant Field Values

T_ARRAY

public static final int T_ARRAY
See Also:
Constant Field Values

T_ARRAY_CAST

public static final int T_ARRAY_CAST
See Also:
Constant Field Values

T_AS

public static final int T_AS
See Also:
Constant Field Values

T_BAD_CHARACTER

public static final int T_BAD_CHARACTER
See Also:
Constant Field Values

T_BOOLEAN_AND

public static final int T_BOOLEAN_AND
See Also:
Constant Field Values

T_BOOLEAN_OR

public static final int T_BOOLEAN_OR
See Also:
Constant Field Values

T_BOOL_CAST

public static final int T_BOOL_CAST
See Also:
Constant Field Values

T_BREAK

public static final int T_BREAK
See Also:
Constant Field Values

T_CASE

public static final int T_CASE
See Also:
Constant Field Values

T_CATCH

public static final int T_CATCH
See Also:
Constant Field Values

T_CHARACTER

public static final int T_CHARACTER
See Also:
Constant Field Values

T_CLASS

public static final int T_CLASS
See Also:
Constant Field Values

T_CLONE

public static final int T_CLONE
See Also:
Constant Field Values

T_CLOSE_TAG

public static final int T_CLOSE_TAG
See Also:
Constant Field Values

T_COMMENT

public static final int T_COMMENT
See Also:
Constant Field Values

T_CONCAT_EQUAL

public static final int T_CONCAT_EQUAL
See Also:
Constant Field Values

T_CONST

public static final int T_CONST
See Also:
Constant Field Values

T_CONSTANT_ENCAPSED_STRING

public static final int T_CONSTANT_ENCAPSED_STRING
See Also:
Constant Field Values

T_CONTINUE

public static final int T_CONTINUE
See Also:
Constant Field Values

T_CURLY_OPEN

public static final int T_CURLY_OPEN
See Also:
Constant Field Values

T_DEC

public static final int T_DEC
See Also:
Constant Field Values

T_DECLARE

public static final int T_DECLARE
See Also:
Constant Field Values

T_DEFAULT

public static final int T_DEFAULT
See Also:
Constant Field Values

T_DIV_EQUAL

public static final int T_DIV_EQUAL
See Also:
Constant Field Values

T_DNUMBER

public static final int T_DNUMBER
See Also:
Constant Field Values

T_DOC_COMMENT

public static final int T_DOC_COMMENT
See Also:
Constant Field Values

T_DO

public static final int T_DO
See Also:
Constant Field Values

T_DOLLAR_OPEN_CURLY_BRACES

public static final int T_DOLLAR_OPEN_CURLY_BRACES
See Also:
Constant Field Values

T_DOUBLE_ARROW

public static final int T_DOUBLE_ARROW
See Also:
Constant Field Values

T_DOUBLE_CAST

public static final int T_DOUBLE_CAST
See Also:
Constant Field Values

T_DOUBLE_COLON

public static final int T_DOUBLE_COLON
See Also:
Constant Field Values

T_ECHO

public static final int T_ECHO
See Also:
Constant Field Values

T_ELSE

public static final int T_ELSE
See Also:
Constant Field Values

T_ELSEIF

public static final int T_ELSEIF
See Also:
Constant Field Values

T_EMPTY

public static final int T_EMPTY
See Also:
Constant Field Values

T_ENCAPSED_AND_WHITESPACE

public static final int T_ENCAPSED_AND_WHITESPACE
See Also:
Constant Field Values

T_ENDDECLARE

public static final int T_ENDDECLARE
See Also:
Constant Field Values

T_ENDFOR

public static final int T_ENDFOR
See Also:
Constant Field Values

T_ENDFOREACH

public static final int T_ENDFOREACH
See Also:
Constant Field Values

T_ENDIF

public static final int T_ENDIF
See Also:
Constant Field Values

T_ENDSWITCH

public static final int T_ENDSWITCH
See Also:
Constant Field Values

T_ENDWHILE

public static final int T_ENDWHILE
See Also:
Constant Field Values

T_END_HEREDOC

public static final int T_END_HEREDOC
See Also:
Constant Field Values

T_EVAL

public static final int T_EVAL
See Also:
Constant Field Values

T_EXIT

public static final int T_EXIT
See Also:
Constant Field Values

T_EXTENDS

public static final int T_EXTENDS
See Also:
Constant Field Values

T_FILE

public static final int T_FILE
See Also:
Constant Field Values

T_FINAL

public static final int T_FINAL
See Also:
Constant Field Values

T_FOR

public static final int T_FOR
See Also:
Constant Field Values

T_FOREACH

public static final int T_FOREACH
See Also:
Constant Field Values

T_FUNCTION

public static final int T_FUNCTION
See Also:
Constant Field Values

T_GLOBAL

public static final int T_GLOBAL
See Also:
Constant Field Values

T_HALT_COMPILER

public static final int T_HALT_COMPILER
See Also:
Constant Field Values

T_IF

public static final int T_IF
See Also:
Constant Field Values

T_IMPLEMENTS

public static final int T_IMPLEMENTS
See Also:
Constant Field Values

T_INC

public static final int T_INC
See Also:
Constant Field Values

T_INCLUDE

public static final int T_INCLUDE
See Also:
Constant Field Values

T_INCLUDE_ONCE

public static final int T_INCLUDE_ONCE
See Also:
Constant Field Values

T_INLINE_HTML

public static final int T_INLINE_HTML
See Also:
Constant Field Values

T_INSTANCEOF

public static final int T_INSTANCEOF
See Also:
Constant Field Values

T_INT_CAST

public static final int T_INT_CAST
See Also:
Constant Field Values

T_INTERFACE

public static final int T_INTERFACE
See Also:
Constant Field Values

T_ISSET

public static final int T_ISSET
See Also:
Constant Field Values

T_IS_EQUAL

public static final int T_IS_EQUAL
See Also:
Constant Field Values

T_IS_GREATER_OR_EQUAL

public static final int T_IS_GREATER_OR_EQUAL
See Also:
Constant Field Values

T_IS_IDENTICAL

public static final int T_IS_IDENTICAL
See Also:
Constant Field Values

T_IS_NOT_EQUAL

public static final int T_IS_NOT_EQUAL
See Also:
Constant Field Values

T_IS_NOT_IDENTICAL

public static final int T_IS_NOT_IDENTICAL
See Also:
Constant Field Values

T_IS_SMALLER_OR_EQUAL

public static final int T_IS_SMALLER_OR_EQUAL
See Also:
Constant Field Values

T_LINE

public static final int T_LINE
See Also:
Constant Field Values

T_LIST

public static final int T_LIST
See Also:
Constant Field Values

T_LNUMBER

public static final int T_LNUMBER
See Also:
Constant Field Values

T_LOGICAL_AND

public static final int T_LOGICAL_AND
See Also:
Constant Field Values

T_LOGICAL_OR

public static final int T_LOGICAL_OR
See Also:
Constant Field Values

T_LOGICAL_XOR

public static final int T_LOGICAL_XOR
See Also:
Constant Field Values

T_MINUS_EQUAL

public static final int T_MINUS_EQUAL
See Also:
Constant Field Values

T_ML_COMMENT

public static final int T_ML_COMMENT
See Also:
Constant Field Values

T_MOD_EQUAL

public static final int T_MOD_EQUAL
See Also:
Constant Field Values

T_MUL_EQUAL

public static final int T_MUL_EQUAL
See Also:
Constant Field Values

T_NEW

public static final int T_NEW
See Also:
Constant Field Values

T_NUM_STRING

public static final int T_NUM_STRING
See Also:
Constant Field Values

T_OBJECT_CAST

public static final int T_OBJECT_CAST
See Also:
Constant Field Values

T_OBJECT_OPERATOR

public static final int T_OBJECT_OPERATOR
See Also:
Constant Field Values

T_OLD_FUNCTION

public static final int T_OLD_FUNCTION
See Also:
Constant Field Values

T_OPEN_TAG

public static final int T_OPEN_TAG
See Also:
Constant Field Values

T_OPEN_TAG_WITH_ECHO

public static final int T_OPEN_TAG_WITH_ECHO
See Also:
Constant Field Values

T_OR_EQUAL

public static final int T_OR_EQUAL
See Also:
Constant Field Values

T_PAAMAYIM_NEKUDOTAYIM

public static final int T_PAAMAYIM_NEKUDOTAYIM
See Also:
Constant Field Values

T_PLUS_EQUAL

public static final int T_PLUS_EQUAL
See Also:
Constant Field Values

T_PRINT

public static final int T_PRINT
See Also:
Constant Field Values

T_PRIVATE

public static final int T_PRIVATE
See Also:
Constant Field Values

T_PUBLIC

public static final int T_PUBLIC
See Also:
Constant Field Values

T_PROTECTED

public static final int T_PROTECTED
See Also:
Constant Field Values

T_REQUIRE

public static final int T_REQUIRE
See Also:
Constant Field Values

T_REQUIRE_ONCE

public static final int T_REQUIRE_ONCE
See Also:
Constant Field Values

T_RETURN

public static final int T_RETURN
See Also:
Constant Field Values

T_SL

public static final int T_SL
See Also:
Constant Field Values

T_SL_EQUAL

public static final int T_SL_EQUAL
See Also:
Constant Field Values

T_SR

public static final int T_SR
See Also:
Constant Field Values

T_SR_EQUAL

public static final int T_SR_EQUAL
See Also:
Constant Field Values

T_START_HEREDOC

public static final int T_START_HEREDOC
See Also:
Constant Field Values

T_STATIC

public static final int T_STATIC
See Also:
Constant Field Values

T_STRING

public static final int T_STRING
See Also:
Constant Field Values

T_STRING_CAST

public static final int T_STRING_CAST
See Also:
Constant Field Values

T_STRING_VARNAME

public static final int T_STRING_VARNAME
See Also:
Constant Field Values

T_SWITCH

public static final int T_SWITCH
See Also:
Constant Field Values

T_THROW

public static final int T_THROW
See Also:
Constant Field Values

T_TRY

public static final int T_TRY
See Also:
Constant Field Values

T_UNSET

public static final int T_UNSET
See Also:
Constant Field Values

T_UNSET_CAST

public static final int T_UNSET_CAST
See Also:
Constant Field Values

T_USE

public static final int T_USE
See Also:
Constant Field Values

T_VAR

public static final int T_VAR
See Also:
Constant Field Values

T_VARIABLE

public static final int T_VARIABLE
See Also:
Constant Field Values

T_WHILE

public static final int T_WHILE
See Also:
Constant Field Values

T_WHITESPACE

public static final int T_WHITESPACE
See Also:
Constant Field Values

T_XOR_EQUAL

public static final int T_XOR_EQUAL
See Also:
Constant Field Values

T_FUNC_C

public static final int T_FUNC_C
See Also:
Constant Field Values

T_CLASS_C

public static final int T_CLASS_C
See Also:
Constant Field Values
Constructor Detail

TokenModule

public TokenModule()
Method Detail

getLoadedExtensions

public java.lang.String[] getLoadedExtensions()
Description copied from class: AbstractQuercusModule
Returns the extensions loaded by the module.

Specified by:
getLoadedExtensions in interface QuercusModule
Overrides:
getLoadedExtensions in class AbstractQuercusModule

getIniDefinitions

public IniDefinitions getIniDefinitions()
Returns the default php.ini values.

Specified by:
getIniDefinitions in interface QuercusModule
Overrides:
getIniDefinitions in class AbstractQuercusModule

highlight_file

public static Value highlight_file(Env env,
                                   StringValue filename,
                                   boolean isReturn)

highlight_string

public static Value highlight_string(Env env,
                                     StringValue s,
                                     boolean isReturn)

token_get_all

public static ArrayValue token_get_all(Env env,
                                       StringValue s)
Parses the string.


token_name

public static java.lang.String token_name(int token)
Returns the token name for th egiven token.