コード例 #1
0
epDefine('EPQ_T_MIN');
epDefine('EPQ_T_NEQUAL');
epDefine('EPQ_T_NEWLINE');
epDefine('EPQ_T_NOT');
epDefine('EPQ_T_NULL');
epDefine('EPQ_T_OR');
epDefine('EPQ_T_ORDER');
epDefine('EPQ_T_RANDOM');
epDefine('EPQ_T_SELECT');
epDefine('EPQ_T_SOUNDEX');
epDefine('EPQ_T_STRCMP');
epDefine('EPQ_T_STRING');
epDefine('EPQ_T_SUM');
epDefine('EPQ_T_TRUE');
epDefine('EPQ_T_WHERE');
epDefine('EPQ_T_UNKNOWN');
/**#@-*/
/**
 * The error class for the EZOQL lexer and parser. It contains: 
 * + msg, the error message
 * + value, the corresponding string value of the current token being processed
 * + line, the number of the starting line in source code from which error occurs
 * + char, the position of the starting char in the starting line from which this error occurs
 * 
 * @author Oak Nauhygon <*****@*****.**>
 * @version $Revision: 1038 $
 * @package ezpdo
 * @subpackage ezpdo.query
 */
class epQueryError extends epLexerError
{
コード例 #2
0
ファイル: epQueryParser.php プロジェクト: justinlyon/scc
epDefine('EPQ_N_FUNC_STRCMP');
epDefine('EPQ_N_CONTAINS');
epDefine('EPQ_N_FROM');
epDefine('EPQ_N_FROM_ITEM');
epDefine('EPQ_N_IDENTIFIER');
epDefine('EPQ_N_LIMIT');
epDefine('EPQ_N_NUMBER');
epDefine('EPQ_N_ORDERBY');
epDefine('EPQ_N_ORDERBY_ITEM');
epDefine('EPQ_N_PATTERN');
epDefine('EPQ_N_PLACEHOLDER');
epDefine('EPQ_N_SELECT');
epDefine('EPQ_N_STRING');
epDefine('EPQ_N_UNKNOWN');
epDefine('EPQ_N_VARIABLE');
epDefine('EPQ_N_WHERE');
/**#@-*/
/**
 * The class of an EZOQL syntax node 
 * 
 * A syntax node is part of the syntax tree and can have its 
 * children nodes and a parent. A node without parent is the 
 * root of the syntax tree. A node can also have named 
 * parameters. 
 * 
 * There are two parameters 'line' and 'char' that the parser
 * always installs for a node, which indicate the location 
 * in the source code from which this node is parsed from. 
 * 
 * A node can also keep records of parsing errors, but so far
 * not used (as the parser {@epQueryParser} also collects errors
コード例 #3
0
ファイル: Log.php プロジェクト: BGCX067/ezpdo2-svn-to-git
epDefine('PEAR_LOG_INFO', 6);
/** Informational */
epDefine('PEAR_LOG_DEBUG', 7);
/** Debug-level messages */
epDefine('PEAR_LOG_ALL', bindec('11111111'));
/** All messages */
epDefine('PEAR_LOG_NONE', bindec('00000000'));
/** No message */
/* Log types for PHP's native error_log() function. */
epDefine('PEAR_LOG_TYPE_SYSTEM', 0);
/** Use PHP's system logger */
epDefine('PEAR_LOG_TYPE_MAIL', 1);
/** Use PHP's mail() function */
epDefine('PEAR_LOG_TYPE_DEBUG', 2);
/** Use PHP's debugging connection */
epDefine('PEAR_LOG_TYPE_FILE', 3);
/** Append to a file */
/**
 * The epLib_Log:: class implements both an abstraction for various logging
 * mechanisms and the Subject end of a Subject-Observer pattern.
 *
 * @author  Chuck Hagenbuch <*****@*****.**>
 * @author  Jon Parise <*****@*****.**>
 * @version $Revision: 1024 $
 * @since   Horde 1.3
 * @package Log
 */
//class Log
class epLib_Log
{
    /**
コード例 #4
0
 */
/**#@+
 * need epBase and epUtil
 */
include_once EP_SRC_BASE . '/epBase.php';
include_once EP_SRC_BASE . '/epUtils.php';
/**#@-*/
/**#@+
 * Predefined tokens for the base lexer ({@link epLexer})
 */
epDefine('EPL_T_FLOAT');
epDefine('EPL_T_IDENTIFIER');
epDefine('EPL_T_INTEGER');
epDefine('EPL_T_NEWLINE');
epDefine('EPL_T_STRING');
epDefine('EPL_T_UNKNOWN');
/**#@-*/
/**
 * The class of a token
 * 
 * A token contains the following fields: 
 * + type, the token type, either primitive string or EPL_T_xxx constants 
 * + value, the corresponding string value of the token, for example 
 * + line, the number of the line where this token is found
 * + char, the position of the starting char from which this token is found
 * 
 * @author Oak Nauhygon <*****@*****.**>
 * @version $Revision$
 * @package ezpdo
 * @subpackage ezpdo.parser
 */
コード例 #5
0
ファイル: epComment.php プロジェクト: justinlyon/scc
/** 
 * Need {@link epLexer} and {@link epParser} for epTagParser
 */
include_once EP_SRC_BASE_PARSER . '/epParser.php';
/**#@+
 * Predefined tokens for the base lexer ({@link epLexer})
 */
epDefine('EPL_T_HAS');
epDefine('EPL_T_COMPOSED_OF');
epDefine('EPL_T_DATA_TYPE');
epDefine('EPL_T_OID');
epDefine('EPL_T_ONE');
epDefine('EPL_T_MANY');
epDefine('EPL_T_INDEX');
epDefine('EPL_T_INVERSE');
epDefine('EPL_T_UNIQUE');
/**#@-*/
/**
 * The lexer for ORM tag value
 * 
 * @author Oak Nauhygon <*****@*****.**>
 * @version $Revision$ $Date: 2006-05-22 08:07:06 -0400 (Mon, 22 May 2006) $
 * @package ezpdo
 * @subpackage ezpdo.compiler
 */
class epTagLexer extends epLexer
{
    /**
     * The keywords for ORM tag 
     */
    protected static $tag_keywords = array('has' => EPL_T_HAS, 'composed_of' => EPL_T_COMPOSED_OF, 'oid' => EPL_T_OID, 'one' => EPL_T_ONE, 'many' => EPL_T_MANY, 'index' => EPL_T_INDEX, 'inverse' => EPL_T_INVERSE, 'unique' => EPL_T_UNIQUE);