<?php
/**
* Project: Smarty: the PHP compiling template engine
* File: Smarty_Compiler.class.php
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* @link http://smarty.php.net/
* @author Monte Ohrt <monte at ohrt dot com>
* @author Andrei Zmievski <andrei@php.net>
* @version 2.6.19
* @copyright 2001-2005 New Digital Group, Inc.
* @package Smarty
*/
/* $Id: Smarty_Compiler.class.php 2736 2007-09-16 14:47:53Z mohrt $ */
/**
* Template compiling class
* @package Smarty
*/
class Smarty_Compiler extends Smarty {
// internal vars
/**#@+
* @access private
*/
var $_folded_blocks = array(); // keeps folded template blocks
var $_current_file = null; // the current template being compiled
var $_current_line_no = 1; // line number for error messages
var $_capture_stack = array(); // keeps track of nested capture buffers
var $_plugin_info = array(); // keeps track of plugins to load
var $_init_smarty_vars = false;
var $_permitted_tokens = array('true','false','yes','no','on','off','null');
var $_db_qstr_regexp = null; // regexps are setup in the constructor
var $_si_qstr_regexp = null;
var $_qstr_regexp = null;
var $_func_regexp = null;
var $_reg_obj_regexp = null;
var $_var_bracket_regexp = null;
var $_num_const_regexp = null;
var $_dvar_guts_regexp = null;
var $_dvar_regexp = null;
var $_cvar_regexp = null;
var $_svar_regexp = null;
var $_avar_regexp = null;
var $_mod_regexp = null;
var $_var_regexp = null;
var $_parenth_param_regexp = null;
var $_func_call_regexp = null;
var $_obj_ext_regexp = null;
var $_obj_start_regexp = null;
var $_obj_params_regexp = null;
var $_obj_call_regexp = null;
var $_cacheable_state = 0;
var $_cache_attrs_count = 0;
var $_nocache_count = 0;
var $_cache_serial = null;
var $_cache_include = null;
var $_strip_depth = 0;
var $_additional_newline = "\n";
/**#@-*/
/**
* The class constructor.
*/
function Smarty_Compiler()
{
// matches double quoted strings:
// "foobar"
// "foo\"bar"
$this->_db_qstr_regexp = '"[^"\\\\]*(?:\\\\.[^"\\\\]*)*"';
// matches single quoted strings:
// 'foobar'
// 'foo\'bar'
$this->_si_qstr_regexp = '\'[^\'\\\\]*(?:\\\\.[^\'\\\\]*)*\'';
// matches single or double quoted strings
$this->_qstr_regexp = '(?:' . $this->_db_qstr_regexp . '|' . $this->_si_qstr_regexp . ')';
// matches bracket portion of vars
// [0]
// [foo]
// [$bar]
$this->_var_bracket_regexp = '\[\$?[\w\.]+\]';
// matches numerical constants
// 30
// -12
// 13.22
$this->_num_const_regexp = '(?:\-?\d+(?:\.\d+)?)';
// matches $ vars (not objects):
// $foo
// $foo.bar
// $foo.bar.foobar
// $foo[0]
// $foo[$bar]
// $foo[5][blah]
// $foo[5].bar[$foobar][4]
$this->_dvar_math_regexp = '(?:[\+\*\/\%]|(?:-(?!>)))';
$this->_dvar_math_var_regexp = '[\$\w\.\+\-\*\/\%\d\>\[\]]';
$this->_dvar_guts_regexp = '\w+(?:' . $this->_var_bracket_regexp
. ')*(?:\.\$?\w+(?:' . $this->_var_bracket_regexp . ')*)*(?:' . $this->_dvar_math_regexp . '(?:' . $this->_num_const_regexp . '|' . $this->_dvar_math_var_regexp . ')*)?';
$this->_dvar_regexp = '\$' . $this->_dvar_guts_regexp;
// matches config vars:
// #foo#
// #foobar123_foo#
$this->_cvar_regexp = '\#\w+\#';
// matches section vars:
// %foo.bar%
$this->_svar_regexp = '\%\w+\.\w+\%';
// matches all valid variables (no quotes, no modifiers)
$this->_avar_regexp = '(?:' . $this->_dvar_regexp . '|'
. $this->_cvar_regexp . '|' . $this->_svar_regexp . ')';
// matches valid variable syntax:
// $foo
// $foo
// #foo#
// #foo#
// "text"
// "text"
$this->_var_regexp = '(?:' . $this->_avar_regexp . '|' . $this->_qstr_regexp . ')';
// matches valid object call (one level of object nesting allowed in parameters):
// $foo->bar
// $foo->bar()
// $foo->bar("text")
// $foo->bar($foo, $bar, "text")
// $foo->bar($foo, "foo")
// $foo->bar->foo()
// $foo->bar->foo->bar()
// $foo->bar($foo->bar)
// $foo->bar($foo->bar())
// $foo->bar($foo->bar($blah,$foo,44,"foo",$foo[0].bar))
$this->_obj_ext_regexp = '\->(?:\$?' . $this->_dvar_guts_regexp . ')';
$this->_obj_restricted_param_regexp = '(?:'
. '(?:' . $this->_var_regexp . '|' . $this->_num_const_regexp . ')(?:' . $this->_obj_ext_regexp . '(?:\((?:(?:' . $this->_var_regexp . '|' . $this->_num_const_regexp . ')'
. '(?:\s*,\s*(?:' . $this->_var_regexp . '|' . $this->_num_const_regexp . '))*)?\))?)*)';
$this->_obj_single_param_regexp = '(?:\w+|' . $this->_obj_restricted_param_regexp . '(?:\s*,\s*(?:(?:\w+|'
. $this->_var_regexp . $this->_obj_restricted_param_regexp . ')))*)';
$this->_obj_params_regexp = '\((?:' . $this->_obj_single_param_regexp
. '(?:\s*,\s*' . $this->_obj_single_param_regexp . ')*)?\)';
$this->_obj_start_regexp = '(?:' . $this->_dvar_regexp . '(?:' . $this->_obj_ext_regexp . ')+)';
$this->_obj_call_regexp = '(?:' . $this->_obj_start_regexp . '(?:' . $this->_obj_params_regexp . ')?(?:' . $this->_dvar_math_regexp . '(?:' . $this->_num_const_regexp . '|' . $this->_dvar_math_var_regexp . ')*)?)';
// matches valid modifier syntax:
// |foo
// |@foo
// |foo:"bar"
// |foo:$bar
// |foo:"bar":$foobar
// |foo|bar
// |foo:$foo->bar
$this->_mod_regexp = '(?:\|@?\w+(?::(?:\w+|' . $this->_num_const_regexp . '|'
. $this->_obj_call_regexp . '|' . $this->_avar_regexp . '|' . $this->_qstr_regexp .'))*)';
// matches valid function name:
// foo123
// _foo_bar
$this->_func_regexp = '[a-zA-Z_]\w*';
// matches valid registered object:
// foo->bar
$this->_reg_obj_regexp = '[a-zA-Z_]\w*->[a-zA-Z_]\w*';
// matches valid parameter values:
// true
// $foo
// $foo|bar
// #foo#
// #foo#|bar
// "text"
// "text"|bar
// $foo->bar
$this->_param_regexp = '(?:\s*(?:' . $this->_obj_call_regexp . '|'
. $this->_var_regexp . '|' . $this->_num_const_regexp . '|\w+)(?>' . $this->_mod_regexp . '*)\s*)';
// matches valid parenthesised function paramet
没有合适的资源?快使用搜索试试~ 我知道了~
PHP实例开发源码-STCMS php音乐系统 v3.6.zip
共491个文件
php:198个
html:127个
gif:80个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 128 浏览量
2022-10-16
04:04:04
上传
评论
收藏 1.22MB ZIP 举报
温馨提示
PHP实例开发源码—STCMS php音乐系统 v3.6.zip PHP实例开发源码—STCMS php音乐系统 v3.6.zip PHP实例开发源码—STCMS php音乐系统 v3.6.zip
资源推荐
资源详情
资源评论
收起资源包目录
PHP实例开发源码-STCMS php音乐系统 v3.6.zip (491个子文件)
style.css 13KB
tinymce.css 8KB
default.css 8KB
common.css 5KB
style.css 2KB
index.css 1KB
cmp_api.fla 80KB
tinymce.gif 12KB
default.gif 7KB
btn_ico.gif 3KB
loading.gif 2KB
add.gif 1KB
watermark.gif 1KB
nopic.gif 1KB
etc_24.gif 1KB
etc_33.gif 1KB
etc_32.gif 1KB
etc_36.gif 1KB
etc_31.gif 1KB
etc_30.gif 1KB
etc_25.gif 1KB
etc_26.gif 1012B
etc_34.gif 992B
etc_35.gif 989B
etc_27.gif 978B
folder.gif 899B
text.gif 895B
bg_rp.gif 756B
downCls.gif 751B
etc_12.gif 687B
etc_02.gif 687B
etc_16.gif 685B
etc_15.gif 683B
etc_03.gif 682B
etc_08.gif 680B
etc_01.gif 671B
etc_09.gif 670B
etc_13.gif 666B
etc_06.gif 660B
etc_14.gif 657B
etc_07.gif 657B
etc_10.gif 657B
etc_04.gif 655B
etc_11.gif 655B
etc_05.gif 643B
list_title.gif 635B
list_title_onclick.gif 627B
download.gif 627B
play.gif 586B
listen.gif 540B
etc_22.gif 473B
etc_20.gif 453B
etc_18.gif 453B
etc_17.gif 445B
etc_23.gif 444B
etc_19.gif 423B
hi.gif 352B
etc_29.gif 342B
etc_21.gif 322B
etc_28.gif 303B
mnopig.gif 253B
btn.gif 253B
icon_sc.gif 241B
close.gif 239B
add_fav.gif 223B
return.gif 211B
10.gif 190B
8.gif 176B
6.gif 174B
5.gif 173B
9.gif 173B
3.gif 172B
4.gif 172B
down_list.gif 170B
1.gif 169B
2.gif 169B
up_list.gif 167B
7.gif 166B
down.gif 154B
slide.gif 95B
11.gif 84B
menu.gif 79B
switch_left.gif 70B
switch_right.gif 70B
direct.gif 68B
direct_blue.gif 64B
spacer.gif 43B
index.htm 1B
index.htm 1B
index.htm 1B
index.htm 1B
index.htm 0B
index.htm 0B
index.html 18KB
index.html 17KB
special.html 10KB
music.html 10KB
index.html 8KB
music_bat.html 6KB
m_register.html 6KB
共 491 条
- 1
- 2
- 3
- 4
- 5
资源评论
易小侠
- 粉丝: 6437
- 资源: 9万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功