繁体   English   中英

试图了解如何聪明地编译

[英]Trying to understand how smarty compiles

有人可以解释这些数组的含义吗?

$yy_action

$yy_lookahead

$yy_shift_ofst

$yy_reduce_ofst

$yyExpectedTokens

$yy_default

$yyRuleInfo

$yyReduceMap

更新

以下是什么意思?

** Suppose the action integer is N.  Then the action is determined as
** follows
**
**   0 <= N < self::YYNSTATE                              Shift N.  That is,
**                                                        push the lookahead
**                                                        token onto the stack
**                                                        and goto state N.
**
**   self::YYNSTATE <= N < self::YYNSTATE+self::YYNRULE   Reduce by rule N-YYNSTATE.
**
**   N == self::YYNSTATE+self::YYNRULE                    A syntax error has occurred.
**
**   N == self::YYNSTATE+self::YYNRULE+1                  The parser accepts its
**                                                        input. (and concludes parsing)
**
**   N == self::YYNSTATE+self::YYNRULE+2                  No such action.  Denotes unused
**                                                        slots in the yy_action[] table.

http://code.google.com/p/smarty-php/source/browse/branches/Smarty3Dev/development/lexer/Lempar+Original.php?r=3662所述 ,这些是

...表格,用于根据当前状态和前瞻令牌确定要采取的措施。 这些表用于实现采用状态号和超前值并返回操作整数的函数。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM