楼上的!你作过那写软件要用到上面5道题的答案?
不会吧,CSDN上的兄弟们不会做上面的题吗?这个可是在学校中考试的题呀!我承认我没有在正规大学受过教育!我上的哪个大学什么都没有教过我,尽有的这点学问还是靠老弟在家自学的!
我想其他的兄弟,应该会这样的问题吧!

解决方案 »

  1.   

    程序中要定义类和对象,并且要使用类和对象!!! 因为程序的目的就是为了展现面向对象的特点和优点!!!
    假定: 对一家公司的员工进行管理:
    包括人员名字,出生日期,加入公司的年份,那个部门(用ring0---ring9表示10个部门) ,工资标准等(多多不限)
    要求有对(假如有员工改名, 可以实现改名, 尽管使用中不常见, 但主要是为了实现面向对象思想)(更改工资标准)(开除员工和增加员工)(通过工龄即加入公司的时间来对员工进行排序, 同一年的可随便排)(通过部门的对员工排序, 个部门的集中在一起显示,譬如ring0的排了下了跟着就是全是ring1部门的)
    请兄弟们快点回帖, 把源代码和程序发给我, 搞定后就给200分!!!
    这是我期末考试的题目, 兄弟们要快快快!!
     我的email :  [email protected]
      

  2.   

    第二道题我作过(用VB),并且得了个A,不过我没有用到堆栈,我用的是数组。现在我没有原程序,我给你试着用Delphi编一下。你的邮箱是多少?
      

  3.   

    我不帮MM答题,特别是不好好学习的MM!!
      

  4.   

    for : dragon_xhf(飞飞) 你要是问问题,自己发个帖子去,干吗在我这里问呀?
      

  5.   

    自己慢慢看吧,还没完全完成,不过交作业已经足够了// zybCompile.h: interface for the CzybCompile class.
    //
    //////////////////////////////////////////////////////////////////////#if !defined(AFX_ZYBCOMPILE_H__22240CB0_9C1D_4E54_AB23_28637992CD65__INCLUDED_)
    #define AFX_ZYBCOMPILE_H__22240CB0_9C1D_4E54_AB23_28637992CD65__INCLUDED_#if _MSC_VER > 1000
    #pragma once
    #endif // _MSC_VER > 1000#pragma warning(disable:4786)#include <iostream>
    #include <string>
    #include <stack>
    #include <map>
    #include <list>
    #include <string.h>using namespace std;#define _YYBYACC 1
    #define _YYPREFIX "yy"
    #define _IDENTIFIER 257 //±ê&Ecirc;&frac34;·&ucirc;
    #define _CONSTANT 258 //&sup3;&pound;&Ecirc;&yacute;
    #define _STRING_LITERAL 259 //×&Ouml;·&ucirc;&acute;&reg;
    #define _SIZEOF 260         //sizeof
    #define _PTR_OP 261         //->
    #define _INC_OP 262         //++
    #define _DEC_OP 263         //--
    #define _LEFT_OP 264        //<<
    #define _RIGHT_OP 265       //>>
    #define _LE_OP 266          //<=
    #define _GE_OP 267          //>=
    #define _EQ_OP 268          //==
    #define _NE_OP 269          //!=
    #define _AND_OP 270         //&&
    #define _OR_OP 271          //||
    #define _MUL_ASSIGN 272     //*=
    #define _DIV_ASSIGN 273     ///=
    #define _MOD_ASSIGN 274     //%=
    #define _ADD_ASSIGN 275     //+=
    #define _SUB_ASSIGN 276     //-=
    #define _LEFT_ASSIGN 277    //<<=
    #define _RIGHT_ASSIGN 278   //>>=
    #define _AND_ASSIGN 279     //&=
    #define _XOR_ASSIGN 280     //^=
    #define _OR_ASSIGN 281      //|=
    #define _TYPE_NAME 282      //
    #define _TYPEDEF 283        //typedef
    #define _EXTERN 284         //extern
    #define _STATIC 285         //static
    #define _AUTO 286           //auto
    #define _REGISTER 287       //register
    #define _CHAR 288           //char
    #define _SHORT 289          //short
    #define _INT 290            //int
    #define _LONG 291           //long
    #define _SIGNED 292         //signed
    #define _UNSIGNED 293       //unsigned
    #define _FLOAT 294          //float
    #define _DOUBLE 295         //double
    #define _CONST 296          //const
    #define _VOLATILE 297       //volatile
    #define _VOID 298           //void
    #define _STRUCT 299         //struct
    #define _UNION 300          //union
    #define _ENUM 301           //enum
    #define _ELLIPSIS 302       //...
    #define _CASE 303           //case
    #define _DEFAULT 304        //default
    #define _IF 305             //if
    #define _ELSE 306           //else
    #define _SWITCH 307         //switch
    #define _WHILE 308          //while
    #define _DO 309             //do
    #define _FOR 310            //for
    #define _GOTO 311           //goto
    #define _CONTINUE 312       //continue
    #define _BREAK 313          //break
    #define _RETURN 314         //return
    #define _YYERRCODE 256       //&acute;í&Icirc;ó#define JNZ 400  //(JNZ, A1, 0, p)----&micro;±A1&Icirc;&ordf;true&Ecirc;±&pound;&not;×&ordf;&Iuml;ò&micro;&Uacute;p&Euml;&Auml;&Ocirc;&ordf;&Ecirc;&frac12;&iexcl;&pound;
    #define JZ 401  //(JNZ, A1, 0, p)----&micro;±A1&Icirc;&ordf;false&Ecirc;±&pound;&not;×&ordf;&Iuml;ò&micro;&Uacute;p&Euml;&Auml;&Ocirc;&ordf;&Ecirc;&frac12;&iexcl;&pound;
    #define JROP 402  //(JROP, A1, A2, P)----&micro;±&sup1;&Oslash;&Iuml;&micro;A1 rop A2&sup3;&Eacute;&Aacute;&cent;&Ecirc;±&pound;&not;×&ordf;&Iuml;ò&micro;&Uacute;p&Euml;&Auml;&Ocirc;&ordf;&Ecirc;&frac12;
    #define JMP 403  //&Icirc;&THORN;&Igrave;&otilde;&frac14;&thorn;×&ordf;&Iuml;ò&micro;&Uacute;p&Euml;&Auml;&Ocirc;&ordf;&Ecirc;&frac12;&iexcl;&pound;
    #define INTTOBOOL 404  //&Otilde;&ucirc;&ETH;&Icirc;×&ordf;&raquo;&macr;&micro;&frac12;&sup2;&frac14;&para;&ucirc;&ETH;&Iacute;#define IS_CONSTANT 1  //&Ocirc;&Euml;&Euml;&atilde;·&ucirc;&Ecirc;&Ccedil;&sup3;&pound;&Ecirc;&yacute;#define CHAR_TO_ADDR 2 //
    #define INT_TO_ADDR 3 //
    #define FLOAT_TO_ADDR 4 //
    #define CHAR_TO_TEMP_ADDR 5
    #define INT_TO_TEMP_ADDR 6
    #define FLOAT_TO_TEMP_ADDR 7
    /*&Ecirc;&yacute;&frac34;&Yacute;&Agrave;à&ETH;&Iacute;*/#define CT_SIMVAR 0 //&frac14;ò&micro;&yen;±&auml;&Aacute;&iquest;&ETH;&Iacute;
    #define CT_CONSTANT 1 //&sup3;&pound;&Ecirc;&yacute;&ETH;&Iacute;
    #define CT_LAB 2 //&Igrave;&oslash;×&ordf;±ê&ordm;&Aring;
    #define CT_ARRAY 3 //&Ecirc;&yacute;×é&ETH;&Iacute;
    #define CT_STRUCT 4 //&frac12;á&sup1;&sup1;&ETH;&Iacute;
    #define CT_ENUM 5 //&Atilde;&para;&frac34;&Ugrave;&ETH;&Iacute;
    #define CT_UNION 6 //&Aacute;&ordf;&ordm;&Iuml;&ETH;&Iacute;#define CT_CHAR 1 //×&Ouml;·&ucirc;&Agrave;à&ETH;&Iacute;
    #define CT_SHORT 2 //&para;&Igrave;&Otilde;&ucirc;&ETH;&Icirc;
    #define CT_INT 3 //&Otilde;&ucirc;&ETH;&Icirc;
    #define CT_LONG 4 //&sup3;¤&Otilde;&ucirc;&ETH;&Icirc;
    #define CT_FLOAT 5 //&cedil;&iexcl;&micro;&atilde;&ETH;&Iacute;
    #define CT_DOUBLE 6 //&Euml;&laquo;±&para;&cedil;&iexcl;&micro;&atilde;&ETH;&Iacute;#define CT_IDENT_INIT 10 //&Ecirc;&Ccedil;&para;¨&Ograve;&aring;&sup3;&otilde;&Ecirc;&frac14;&raquo;&macr;#define CT_UNSIGNED 100 //&Icirc;&THORN;·&ucirc;&ordm;&Aring;&ETH;&Iacute;#define CT_POINTER 100 //&Ouml;&cedil;&Otilde;&euml;&ETH;&Iacute;#define CT_TYPEDEF 1000 //&ordm;ê&para;¨&Ograve;&aring;&ETH;&Iacute;
    static short yylhs[] = {                                        -1,
        1,    1,    1,    1,    3,    3,    3,    3,    3,    3,
        3,    3,    5,    5,    7,    7,    7,    7,    7,    7,
        8,    8,    8,    8,    8,    8,    9,    9,   11,   11,
       11,   11,   12,   12,   12,   13,   13,   13,   14,   14,
       14,   14,   14,   15,   15,   15,   16,   16,   17,   17,
       18,   18,   19,   19,   20,   20,   21,   21,    6,    6,
       22,   22,   22,   22,   22,   22,   22,   22,   22,   22,
       22,    2,    2,   23,   24,   24,   25,   25,   25,   25,
       25,   25,   26,   26,   30,   30,   27,   27,   27,   27,
       27,   28,   28,   28,   28,   28,   28,   28,   28,   28,
       28,   28,   28,   33,   33,   33,   35,   35,   36,   36,
       37,   38,   38,   38,   38,   39,   39,   40,   40,   40,
       34,   34,   34,   41,   41,   42,   42,   29,   29,   31,
       31,   44,   44,   44,   44,   44,   44,   44,   43,   43,
       43,   43,   48,   48,   46,   46,   49,   49,   50,   50,
       50,   47,   47,   10,   10,   51,   51,   51,   52,   52,
       52,   52,   52,   52,   52,   52,   52,   32,   32,   32,
       53,   53,   54,   54,   54,   54,   54,   54,   61,   55,
       55,   55,   56,   56,   56,   56,   65,   65,   64,   64,
       57,   57,   66,   67,   58,   58,   58,   69,   70,   71,
       72,   73,   74,   74,   59,   59,   59,   60,   60,   60,
       60,   60,    0,    0,   76,   76,   77,   77,   77,   77,
       75,   68,   78,   62,   63,    4,    4,   45,   45,
    };
    static short yylen[] = {                                         2,
        1,    1,    1,    3,    1,    1,    3,    4,    3,    3,
        2,    2,    1,    3,    1,    2,    2,    2,    2,    4,
        1,    1,    1,    1,    1,    1,    1,    4,    1,    3,
        3,    3,    1,    3,    3,    1,    3,    3,    1,    3,
        3,    3,    3,    1,    3,    3,    1,    3,    1,    3,
        1,    3,    1,    3,    1,    3,    1,    5,    1,    3,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    3,    1,    2,    2,    1,    2,    1,    2,
        1,    2,    2,    3,    1,    3,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    5,    4,    2,    1,    1,    1,    2,
        3,    2,    1,    2,    1,    1,    3,    1,    2,    3,
        4,    5,    2,    1,    3,    1,    3,    1,    1,    2,
        1,    1,    3,    1,    3,    4,    4,    3,    1,    2,
        2,    3,    1,    2,    1,    3,    1,    3,    2,    2,
        1,    1,    3,    1,    2,    1,    1,    2,    3,    2,
        3,    3,    4,    2,    3,    3,    4,    1,    3,    4,
        1,    3,    1,    1,    1,    1,    1,    1,    2,    2,
        2,    2,    2,    3,    3,    4,    1,    2,    1,    2,
        1,    2,    4,    3,    2,    2,    2,    1,    4,    1,
        2,    3,    2,    3,    2,    6,    2,    3,    2,    2,
        2,    3,    1,    2,    1,    1,    4,    3,    3,    2,
        2,    4,    1,    3,    2,    4,    4,    4,    4,
    };
    static short yydefred[] = {                                      0,
      132,  103,   87,   88,   89,   90,   91,   93,   94,   95,
       96,   99,  100,   97,   98,  128,  129,   92,  107,  108,
        0,    0,    0,    0,  216,    0,    0,    0,    0,    0,
        0,  101,  102,    0,    0,    0,    0,  213,  215,    0,
        0,    0,  143,  141,    0,  214,   75,   83,    0,    0,
       76,   78,   80,   82,    0,  187,    0,  220,    0,    0,
        0,    0,    0,    0,    0,    0,    0,    0,  124,  133,
      144,  142,    0,  218,    0,   84,    0,    0,    2,    3,
        0,    0,    0,  223,    0,    0,    0,  198,  200,    0,
        0,    0,    0,    0,    0,   21,   22,   23,   24,   25,
       26,  191,  183,    5,    0,    0,    0,   72,    0,    0,
       29,    0,    0,    0,    0,    0,    0,    0,    0,    0,
        0,   59,  189,  173,  174,  175,  176,  177,  178,    0,
        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
        0,    0,    0,    0,    0,  188,  219,    0,    0,    0,
        0,  109,    0,  152,  138,    0,    0,    0,    0,  147,
        1,  135,   27,   74,    0,    0,    0,    0,    0,  121,
        0,  168,   86,  217,  179,    0,   19,    0,   16,   17,
      225,    0,    0,    0,    0,  209,  210,  211,    0,    0,
        0,    0,    0,  192,    0,   11,   12,    0,    0,    0,
        0,   62,   63,   64,   65,   66,   67,   68,   69,   70,
       71,   61,    0,   18,    0,    0,    0,    0,    0,    0,
        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
        0,    0,    0,  180,  181,  182,  184,  190,  185,    0,
        0,  196,  197,    0,  205,  201,    0,  221,  207,  203,
        0,    0,    0,  112,  114,  105,  110,    0,    0,    0,
      116,    0,    0,  149,    0,  150,    0,  136,  137,    0,
        0,  228,  229,  122,  127,  125,  171,    0,    0,    0,
        0,  202,  208,  212,    4,    0,    0,    0,  155,   73,
       10,    7,    0,   13,    9,    0,    0,   60,   30,   31,
       32,    0,    0,    0,    0,    0,    0,    0,    0,    0,
        0,    0,    0,    0,    0,    0,    0,  186,  194,    0,
        0,  204,  224,  104,  119,    0,    0,  111,  164,    0,
        0,  160,    0,    0,    0,    0,  153,  146,  148,    0,
      169,   20,  193,  222,   28,    8,    0,  226,  227,    0,
      199,    0,  120,  117,  165,  159,  161,  166,    0,  162,
        0,  170,  172,   14,   58,    0,  167,  163,  206,
    };
    static short yydgoto[] = {                                      24,
      104,  105,  106,  107,  293,  108,  109,  110,  111,  191,
      112,  113,  114,  115,  116,  117,  118,  119,  120,  121,
      122,  213,  165,   56,   57,   27,   28,   29,   30,   48,
       31,  173,   32,   33,   34,  151,  152,  153,  260,  261,
       68,   69,   35,   36,   37,  330,  158,   45,  159,  160,
      331,  267,  278,  123,  124,  125,  126,  127,  128,  129,
      130,  131,  132,  133,   59,  135,  136,  137,  138,  139,
      140,  141,  142,  143,  144,   38,   39,  145,
    };
    static short yysindex[] = {                                    651,
        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
     -103,  -29,  -32,  651,    0,  149,  154, 1876, 1876, 1876,
      778,    0,    0,  -77,  -21,  -13,  -41,    0,    0,  -66,
     -198,   46,    0,    0,  -32,    0,    0,    0,  995,  -29,
        0,    0,    0,    0,   56,    0,  149,    0,  778,  -55,
     2004,  -13,  700, 1317, 1873, -198,   55,   -8,    0,    0,
        0,    0, 1054,    0,  778,    0,   59,   75,    0,    0,
     1894, 1921, 1921,    0,   87,  144,  167,    0,    0,  192,
      -20,  189,  191, 1689,  339,    0,    0,    0,    0,    0,
        0,    0,    0,    0,  158,  -28,  179,    0,  142, 1873,
        0,  270,  173,  -88,  161,   26,  252,  202,  180,   39,
      -49,    0,    0,    0,    0,    0,    0,    0,    0,  456,
      456,  456,  209,  150,  456,  456,  456,  290,  456,  456,
       25, 1807,  456, 1072, 1873,    0,    0, 2004, 2004, 2004,
     1900,    0,    3,    0,    0,  289,  296,  170,  267,    0,
        0,    0,    0,    0,  265,  269,   -4, 1873, -198,    0,
     1054,    0,    0,    0,    0,  339,    0, 1873,    0,    0,
        0, 1873, 1873, 1807,  315,    0,    0,    0,  166,  197,
      335,   27, 1873,    0,  126,    0,    0, 1818,  134, 1873,
     1873,    0,    0,    0,    0,    0,    0,    0,    0,    0,
        0,    0, 1873,    0, 1873, 1873, 1873, 1873, 1873, 1873,
     1873, 1873, 1873, 1873, 1873, 1873, 1873, 1873, 1873, 1873,
     1873, 1873, 1873,    0,    0,    0,    0,    0,    0,  352,
      120,    0,    0, 1873,    0,    0,  353,    0,    0,    0,
      262,  394, 1946,    0,    0,    0,    0, 1873,  398,  186,
        0,  389, 1857,    0,  -37,    0,   57,    0,    0,  219,
     1983,    0,    0,    0,    0,    0,    0,   16,  452,  284,
      334,    0,    0,    0,    0, 1873,  576,   62,    0,    0,
        0,    0,  355,    0,    0,   30,  107,    0,    0,    0,
        0,  270,  270,  173,  173,  -88,  -88,  -88,  -88,  161,
      161,   26,  252,  202,  180,   39,  -11,    0,    0,  357,
     1873,    0,    0,    0,    0, 1873,    3,    0,    0,  454,
      464,    0,  404,   57,  679, 1865,    0,    0,    0,   -1,
        0,    0,    0,    0,    0,    0, 1873,    0,    0, 1873,
        0,  359,    0,    0,    0,    0,    0,    0,  465,    0,
      415,    0,    0,    0,    0,  423,    0,    0,    0,
    };
    static short yyrindex[] = {                                      0,
        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
        0,    0,  280,    0,    0,    0,    0,   41,   51,  665,
        0,    0,    0,    0,    0,  837,  545,    0,    0,  490,
        0,    0,    0,    0,  282,    0,    0,    0,  222,    0,
        0,    0,    0,    0,    0,    0,    0,    0,    0,  514,
        0,  858,    0,    0,    0,    0,   22,    0,    0,    0,
        0,    0,    0,    0,    0,    0,  222,  992,    0,    0,
        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
        0,    0,    0,    0,    0, 1123,  965,    0, 1260,    0,
        0,  466, 1368, 1474, 1660,   14, 1916, 1937, 1388,   12,
      185,    0,    0,    0,    0,    0,    0,    0,    0,    0,
        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
        0,    0,    0,    0,    0,    0,    0,    0,  535, 1160,
        0,    0,    0,    0,    0,  361,    0,    0,  486,    0,
        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
        0,  492,    0,    0,    0,    0,    0,    0,    0,    0,
        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
      441,    0,    0,    0,    0,    0,    0,    0,    0,    0,
        0,    0,    0,    0,    0,    0,    0,    0,  227,    0,
        0,    0,    0,    0,  429,    0,  444,    0,    0,    0,
        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
        0,    0,    0,    0,    0,    0,    0,  495,    0,    0,
        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
        0, 1283, 1320, 1377, 1414, 1502, 1562, 1613, 1653, 1717,
     1745, 1761, 1949, 1960, 1993,   21,    0,    0,    0,    0,
        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
        0,    0,    0,  446,    0,    0,    0,    0,    0,    0,
        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
        0,    0,    0,    0,    0,    0,    0,    0,    0,
    };
    static short yygindex[] = {                                      0,
        0, 1911,    0,    0,    0,  -58,  -59,    0,  -89,  362,
      206,  271,  164,  276,  312,  313,  311,  314,  318,    0,
      -57,    0,  -39,  119,    1,    0,    0,  474,  151,  493,
      -22, -154,    0,    0,    0,  396, -117,  -46,    0,  220,
      485,  383,   -7,  -26,    0,  -61,    0,    0,    0,  286,
      -80, -113,    0, 1965,    0,  156,  -94,    0,    0,    0,
        0,    0,    0,  419,   95,    0,    0,    0,    0,    0,
        0,    0,    0,    0,    0,  537,    0,    0,
    };
    static short yytable[] = {                                      42,
       26,  157,  262,   49,  163,  163,  164,  164,   62,   23,
       22,  198,   23,  233,  172,   44,  277,  199,   22,   41,
      214,  177,  179,  180,   26,  166,   63,   77,   52,   53,
       54,  101,  193,  257,   77,  169,   96,   72,   95,  169,
       97,   98,   22,   99,   23,   61,  350,  248,  192,   65,
      163,   47,   55,  263,   47,   55,   66,   47,   67,  340,
      258,   56,  200,  156,   56,  126,  287,  148,   23,   55,
       55,   47,   47,  193,   55,  266,   47,   64,   56,   56,
       77,   77,   77,   56,   77,  163,   70,  164,  101,  282,
       79,   79,   79,   96,   79,   95,  335,   97,   98,   77,
       99,  287,  254,  255,   55,  252,   47,   47,  163,   79,
      164,  289,  172,   56,  102,  168,  170,  263,   25,   73,
      274,  171,  348,  362,  100,  299,  300,  301,  275,  192,
      259,   77,  175,  264,  290,  257,   55,   47,   47,  294,
      341,   79,   25,   75,  181,   56,  126,  336,  265,  134,
      193,  334,  263,   40,  298,  163,  163,  163,  163,  163,
      163,  163,  163,  163,  163,  163,  163,  163,  163,  163,
      163,  163,  163,   43,  334,  220,  221,  146,   55,   60,
      103,  100,  101,  182,  288,  363,   58,   96,   22,   95,
       23,   97,   98,  146,   99,   71,  345,   50,  163,  349,
      164,  193,  212,  163,   74,  164,  183,   47,  102,  193,
      269,  150,   51,  270,  147,  218,  194,  219,  325,    1,
      224,  232,  225,  333,  284,   57,  163,    1,   57,  327,
      174,  184,  195,  196,  197,    1,  185,  285,   62,   42,
      193,  101,   57,   57,  328,  150,   96,  186,   95,  187,
       97,   98,  146,   99,  265,  161,   79,   80,   81,    1,
       82,   83,  156,   16,   17,   85,  163,  102,  164,  201,
      118,  156,   55,  359,  239,  100,  163,   57,  164,  288,
       85,  172,   55,   47,   47,  118,  353,  156,  364,  228,
      163,   56,  365,  226,  227,  229,  361,   77,  150,  150,
      150,  150,  322,  230,  259,  193,  217,   79,  231,   57,
      271,  215,   78,   79,   80,   81,  216,   82,   83,  139,
      139,  140,  140,  139,  343,  140,  150,  193,  262,  244,
       23,   55,  247,  237,  100,  156,  268,    2,    3,    4,
        5,    6,    7,    8,    9,   10,   11,   12,   13,   14,
       15,   16,   17,   18,   19,   20,   21,  272,   84,   85,
       86,  273,   87,   88,   89,   90,   91,   92,   93,   94,
      139,  101,  140,  283,  344,  286,   96,  193,   95,  263,
       97,   98,  291,   99,  101,  306,  307,  308,  309,   96,
      295,   95,  321,   97,   98,  346,   99,  351,  347,  366,
      193,  151,  193,  150,  151,    1,   78,   79,   80,   81,
      102,   82,   83,  202,  203,  204,  205,  206,  207,  208,
      209,  210,  211,  302,  303,  319,  222,  223,  262,  329,
       23,    2,    3,    4,    5,    6,    7,    8,    9,   10,
       11,   12,   13,   14,   15,   16,   17,   18,   19,   20,
       21,  323,   84,   85,   86,  326,   87,   88,   89,   90,
       91,   92,   93,   94,  100,   78,   79,   80,   81,  156,
       82,   83,  156,  195,   55,  337,  318,  100,  195,  263,
      195,  369,  195,  195,  157,  195,  158,  157,  101,  158,
      304,  305,  342,   96,  355,   95,  357,   97,   98,  195,
       99,  310,  311,   33,  356,  367,   33,  368,   33,   33,
       33,   84,   85,   86,  102,   87,   88,   89,   90,   91,
       92,   93,   94,   33,   33,   33,  145,   33,   33,  123,
      123,  123,  154,  123,  149,  156,  139,  279,  140,  312,
      314,  313,   76,  253,  315,    1,  354,  123,  123,  316,
      167,  276,  240,  106,  106,  106,  339,  106,   33,   33,
       46,    0,    0,  195,    0,  195,  195,    0,  149,    0,
        0,  106,  106,    0,  113,  113,  113,    0,   55,    0,
      123,  100,    0,    0,  134,  134,    0,    0,  134,   33,
       33,    0,  113,    0,    0,  161,   79,   80,   81,    0,
       82,   83,  134,  134,  106,  134,    0,    0,   78,   79,
       80,   81,    0,   82,   83,  287,  329,   23,    0,    0,
        2,  149,  149,  149,  149,  113,    8,    9,   10,   11,
       12,   13,   14,   15,   16,   17,   18,   19,   20,   21,
        0,    0,    0,    0,    0,    1,    0,    0,    0,  149,
        0,    0,    0,    0,   84,   85,   86,    0,   87,   88,
       89,   90,   91,   92,   93,   94,  263,  134,    0,    0,
        2,    3,    4,    5,    6,    7,    8,    9,   10,   11,
       12,   13,   14,   15,   16,   17,   18,   19,   20,   21,
       22,    0,   23,    0,    0,    0,    0,  195,  195,  195,
      195,    0,  195,  195,   81,   81,   81,    0,   81,    0,
        0,    0,   78,   79,   80,   81,    0,   82,   83,  358,
        0,    0,    0,   81,    0,    0,  149,    0,    0,   33,
       33,   33,   33,   33,   33,   33,   33,    0,    0,    0,
      155,    0,    0,  195,  195,  195,  123,  195,  195,  195,
      195,  195,  195,  195,  195,   81,    0,    0,   84,   85,
       86,    0,   87,   88,   89,   90,   91,   92,   93,   94,
      106,  123,  123,  123,  123,  123,  123,  123,  123,  123,
      123,  123,  123,  123,  123,  123,  123,  123,  123,  123,
      123,  113,    0,    0,    0,  106,  106,  106,  106,  106,
      106,  106,  106,  106,  106,  106,  106,  106,  106,  106,
      106,  106,  106,  106,  106,    0,    0,    0,    0,    0,
        0,    0,    0,    0,    0,    0,  134,  134,  134,  134,
      134,  134,  134,  134,  134,  134,  134,  134,  134,  134,
      134,  134,  134,  134,  134,  134,    0,    0,    0,    0,
        0,    0,    0,    0,    0,    0,    0,    2,    3,    4,
        5,    6,    7,    8,    9,   10,   11,   12,   13,   14,
       15,   16,   17,   18,   19,   20,   21,  131,    0,    0,
      131,    0,    0,    0,    0,    0,    0,    0,    0,    0,
        0,    0,    0,    0,  131,  131,    0,  131,  130,    0,
       55,  130,    0,    0,    0,    0,    0,    1,    0,    0,
        0,    0,    0,    0,    0,  130,  130,    0,  130,    0,
        0,   81,    0,    0,    0,    0,    0,    0,    0,    0,
        0,    0,    2,    3,    4,    5,    6,    7,    8,    9,
       10,   11,   12,   13,   14,   15,   16,   17,   18,   19,
       20,   21,    0,    0,    0,    0,  154,    0,    0,  131,
        2,    3,    4,    5,    6,    7,    8,    9,   10,   11,
       12,   13,   14,   15,   16,   17,   18,   19,   20,   21,
      130,    2,    3,    4,    5,    6,    7,    8,    9,   10,
       11,   12,   13,   14,   15,   16,   17,   18,   19,   20,
       21,    6,    6,    0,    6,    6,    6,    6,    6,    6,
        6,    6,    0,    0,    0,    0,    0,    0,    0,    0,
        0,    0,    6,    6,    6,    6,    6,    6,    1,    1,
        0,    1,    0,    1,    1,    1,    1,    1,    1,    0,
        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
        1,    1,    1,    1,    1,   73,    0,    6,    6,    2,
        3,    4,    5,    6,    7,    8,    9,   10,   11,   12,
       13,   14,   15,   16,   17,   18,   19,   20,   21,    0,
        0,    0,    1,    0,    0,    1,  101,    0,    6,    6,
        0,   96,    0,   95,    0,   97,   98,    0,   99,    0,
        0,    0,    0,    0,  101,    0,    0,    0,    0,   96,
        0,   95,  250,   97,   98,    1,   99,   55,  131,  131,
      131,  131,  131,  131,  131,  131,  131,  131,  131,  131,
      131,  131,  131,  131,  131,  131,  131,  131,    0,  130,
      130,  130,  130,  130,  130,  130,  130,  130,  130,  130,
      130,  130,  130,  130,  130,  130,  130,  130,  130,   15,
       15,    0,    0,   15,   15,   15,   15,   15,    0,   15,
        0,    0,    0,    0,    0,    0,  171,    0,    0,  100,
       15,   15,   15,   15,   15,   15,    0,    0,    0,    0,
        0,    0,    0,    0,    0,    0,    0,  100,    0,  115,
      115,  115,    0,    0,    0,    0,    0,    0,    0,    0,
        0,    0,    0,    0,    0,   15,   15,  115,    0,    0,
        0,    0,    0,    0,    0,    6,    6,    6,    6,    6,
        6,    6,    6,    6,    6,    6,    6,    6,    6,    6,
        6,    6,    6,    6,    6,    6,   15,   15,    0,    0,
      115,    0,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    0,    0,    0,    2,    3,    4,    5,
        6,    7,    8,    9,   10,   11,   12,   13,   14,   15,
       16,   17,   18,   19,   20,   21,   27,   27,    0,    0,
       27,   27,   27,   27,   27,    0,   27,    0,    0,    0,
      161,   79,   80,   81,    0,   82,   83,   27,   27,   27,
       34,   27,   27,   34,    0,   34,   34,   34,  161,   79,
       80,   81,    0,   82,   83,    0,    0,    0,    0,    0,
       34,   34,   34,    0,   34,   34,    0,    0,    0,  101,
        0,    0,   27,   27,   96,    0,   95,   35,   97,   98,
       35,   99,   35,   35,   35,    0,    0,    0,    0,    0,
        0,    0,    0,    0,    0,   34,   34,   35,   35,   35,
        0,   35,   35,   27,   27,    0,   15,   15,   15,   15,
       15,   15,   15,   15,   15,   15,   15,   15,   15,   15,
       15,   15,   15,   15,    0,   36,   34,   34,   36,  162,
        0,   36,   35,   35,   37,    0,  115,   37,    0,    0,
       37,    0,    0,    0,    0,   36,   36,   36,   53,   36,
       36,   53,    0,    0,   37,   37,   37,    0,   37,   37,
        0,    0,  100,   35,   35,   53,   53,    0,    0,    0,
       53,   38,    0,    0,   38,    0,    0,   38,    0,    0,
       36,   36,    0,    0,    0,    0,    0,    0,    0,   37,
       37,   38,   38,   38,    0,   38,   38,    0,    0,    0,
       53,    0,    0,    0,    0,    0,    0,    0,    0,    0,
        0,   36,   36,    0,    0,    0,    0,    0,    0,    0,
       37,   37,    0,    0,    0,    0,   38,   38,    0,    0,
        0,   39,   53,    0,   39,    0,    0,   39,    0,    0,
        0,    0,    0,   27,   27,   27,   27,   27,   27,   27,
       27,   39,   39,   39,    0,   39,   39,   38,   38,   42,
        0,    0,   42,    0,    0,   42,   34,   34,   34,   34,
       34,   34,   34,   34,    0,    0,    0,    0,    0,   42,
       42,   42,    0,   42,   42,    0,   39,   39,    0,    0,
        0,    0,    0,  161,   79,   80,   81,    0,   82,   83,
        0,    0,    0,   35,   35,   35,   35,   35,   35,   35,
       35,    0,    0,    0,   42,   42,    0,   39,   39,   43,
        0,    0,   43,    0,    0,   43,    0,    0,    0,    0,
        0,    0,    0,    0,    0,    0,    0,    0,    0,   43,
       43,   43,    0,   43,   43,   42,   42,    0,    0,    0,
        0,   36,   36,   36,   36,   36,   36,   36,   36,    0,
       37,   37,   37,   37,   37,   37,   37,   37,    0,    0,
       40,    0,    0,   40,   43,   43,   40,   53,   53,    0,
        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
       40,   40,   40,    0,   40,   40,    0,   38,   38,   38,
       38,   38,   38,   38,   38,   43,   43,    0,    0,    0,
       41,    0,    0,   41,    0,    0,   41,   44,    0,    0,
       44,    0,    0,   44,    0,   40,   40,    0,    0,    0,
       41,   41,   41,    0,   41,   41,    0,   44,   44,    0,
        0,  101,   44,    0,    0,    0,   96,    0,   95,    0,
       97,   98,    0,   99,    0,    0,   40,   40,    0,   39,
       39,   39,   39,   39,   39,   41,   41,  188,    0,    0,
        0,    0,   44,   44,   45,    0,    0,   45,    0,    0,
       45,    0,    0,    0,    0,    0,    0,   42,   42,   42,
       42,   42,   42,    0,   45,   45,   41,   41,    0,   45,
        0,    0,   46,   44,   44,   46,    0,    0,   46,    0,
        0,    0,    0,    0,    0,    0,    0,    0,   48,    0,
        0,   48,   46,   46,   48,    0,    0,   46,    0,   45,
       45,    0,    0,    0,  100,    0,    0,    0,   48,   48,
        0,    0,    0,   48,    0,    0,    0,   43,   43,   43,
       43,   43,   43,    0,    0,    0,    0,   46,   46,  101,
       45,   45,    0,    0,   96,    0,   95,    0,   97,   98,
      101,   99,    0,   48,   48,   96,    0,   95,  292,   97,
       98,    0,   99,    0,    0,  102,    0,    0,   46,   46,
        0,    0,    0,    0,    0,    0,    0,    0,   40,   40,
       40,   40,   40,   40,   48,   48,    0,    0,    0,  101,
        0,    0,    0,    0,   96,    0,   95,  101,   97,   98,
        0,   99,   96,    0,   95,  101,   97,   98,    0,   99,
       96,    0,   95,    0,   97,   98,    0,   99,   41,   41,
       41,   41,   41,   41,    0,    0,  101,   44,   44,   44,
       44,   96,  100,  176,    0,   97,   98,    0,   99,    0,
        0,    0,    0,  100,    0,  161,   79,   80,   81,  332,
       82,   83,    0,  101,    0,    0,   49,  360,   96,   49,
      178,    0,   97,   98,    0,   99,    0,    0,    0,    0,
        0,    0,    0,   49,   49,    0,    0,   51,   49,    0,
       51,    0,  100,    0,   45,   45,   45,   45,    0,   50,
      100,    0,   50,    0,   51,   51,    0,    0,  100,   51,
       52,    0,    0,   52,  189,  190,   50,   50,   49,   49,
        0,   50,   46,   46,   46,   46,    0,   52,   52,  100,
        0,    0,   52,    0,  256,    0,    0,    0,    0,   51,
       48,   48,    0,   54,    0,    0,   54,    0,    0,   49,
       49,   50,   50,    0,    0,    0,  100,    0,    0,    0,
       54,   54,   52,    0,  251,   54,    0,    0,    0,    0,
       51,   51,    0,  161,   79,   80,   81,    0,   82,   83,
      324,    0,   50,   50,  161,   79,   80,   81,    0,   82,
       83,    0,    0,   52,   52,   54,  190,    0,  190,    0,
        0,    0,  280,  281,  234,  235,  236,  238,    0,  241,
      242,  243,    0,  245,  246,    0,    0,  249,    0,    0,
      296,  297,    0,  161,   79,   80,   81,   54,   82,   83,
        0,  161,   79,   80,   81,    0,   82,   83,    0,  161,
       79,   80,   81,    0,   82,   83,    0,    0,    0,    0,
        0,    0,    0,  317,    0,    0,    0,    0,    0,    0,
      161,   79,   80,   81,  320,   82,   83,    2,    3,    4,
        5,    6,    7,    8,    9,   10,   11,   12,   13,   14,
       15,   16,   17,   18,   19,   20,   21,  161,   79,   80,
       81,    2,   82,   83,    0,   49,   49,    8,    9,   10,
       11,   12,   13,   14,   15,   16,   17,   18,   19,   20,
       21,    0,    0,    0,  238,    0,   51,   51,    0,    0,
        0,    0,    0,    0,    0,    0,    0,    0,   50,   50,
        0,    0,    0,    0,    0,    0,    0,    2,    0,   52,
       52,  352,    0,    8,    9,   10,   11,   12,   13,   14,
       15,   16,   17,   18,   19,   20,   21,    0,    0,    0,
        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
        0,    0,   54,   54,    2,    3,    4,    5,    6,    7,
        8,    9,   10,   11,   12,   13,   14,   15,   16,   17,
       18,   19,   20,   21,  338,    2,    0,    0,    0,    0,
        0,    8,    9,   10,   11,   12,   13,   14,   15,   16,
       17,   18,   19,   20,   21,
    };
    static short yycheck[] = {                                      22,
        0,   63,   40,   26,   64,   65,   64,   65,   35,   42,
       40,   40,   42,   63,   73,   23,  171,   46,   40,  123,
      110,   81,   82,   83,   24,   65,   40,   50,   28,   29,
       30,   33,   44,  151,   57,   44,   38,   45,   40,   44,
       42,   43,   40,   45,   42,  123,   58,  142,   95,   91,
      110,   38,   41,   91,   41,   44,  123,   44,  257,   44,
       58,   41,   91,   63,   44,   44,   40,  123,   42,   58,
       59,   58,   59,   44,   63,  156,   63,   91,   58,   59,
       40,   41,   42,   63,   44,  145,   41,  145,   33,  184,
       40,   41,   42,   38,   44,   40,   40,   42,   43,   59,
       45,   40,  149,  150,   93,  145,   93,   94,  168,   59,
      168,  192,  171,   93,   59,   61,  125,   91,    0,   61,
      125,  123,   93,  125,  126,  215,  216,  217,  168,  176,
      153,   91,   58,  156,  193,  253,  125,  124,  125,  198,
      125,   91,   24,   49,   58,  125,  125,   91,  156,   55,
       44,  265,   91,  257,  213,  215,  216,  217,  218,  219,
      220,  221,  222,  223,  224,  225,  226,  227,  228,  229,
      230,  231,  232,   23,  288,  264,  265,   59,  123,  257,
      125,  126,   33,   40,  192,  340,   31,   38,   40,   40,
       42,   42,   43,   75,   45,   45,  286,   44,  258,   93,
      258,   44,   61,  263,   49,  263,   40,   59,   59,   44,
       41,   61,   59,   44,   59,   43,   59,   45,  258,  257,
       60,  271,   62,  263,   59,   41,  286,  257,   44,   44,
       75,   40,  261,  262,  263,  257,  257,   41,  265,  262,
       44,   33,   58,   59,   59,   95,   38,   59,   40,   59,
       42,   43,  134,   45,  262,  257,  258,  259,  260,  257,
      262,  263,  262,  296,  297,   44,  326,   59,  326,   91,
       44,  271,  123,  335,  125,  126,  336,   93,  336,  287,
       59,  340,  271,  270,  271,   59,  326,  287,  347,   38,
      350,  271,  350,  268,  269,   94,  336,  257,  148,  149,
      150,  151,   41,  124,  327,   44,   37,  257,  270,  125,
       44,   42,  257,  258,  259,  260,   47,  262,  263,   40,
       41,   40,   41,   44,   41,   44,  176,   44,   40,   40,
       42,  123,  308,  125,  126,  335,   41,  282,  283,  284,
      285,  286,  287,  288,  289,  290,  291,  292,  293,  294,
      295,  296,  297,  298,  299,  300,  301,   93,  303,  304,
      305,   93,  307,  308,  309,  310,  311,  312,  313,  314,
       91,   33,   91,   59,   41,   41,   38,   44,   40,   91,
       42,   43,  257,   45,   33,  222,  223,  224,  225,   38,
      257,   40,   40,   42,   43,   41,   45,   41,   44,   41,
       44,   41,   44,  253,   44,  257,  257,  258,  259,  260,
       59,  262,  263,  272,  273,  274,  275,  276,  277,  278,
      279,  280,  281,  218,  219,  306,  266,  267,   40,   41,
       42,  282,  283,  284,  285,  286,  287,  288,  289,  290,
      291,  292,  293,  294,  295,  296,  297,  298,  299,  300,
      301,   58,  303,  304,  305,   58,  307,  308,  309,  310,
      311,  312,  313,  314,  126,  257,  258,  259,  260,   41,
      262,  263,   44,   33,  123,  257,  125,  126,   38,   91,
       40,   59,   42,   43,   41,   45,   41,   44,   33,   44,
      220,  221,   41,   38,   41,   40,   93,   42,   43,   59,
       45,  226,  227,   38,   41,   41,   41,   93,   43,   44,
       45,  303,  304,  305,   59,  307,  308,  309,  310,  311,
      312,  313,  314,   58,   59,   60,   41,   62,   63,   40,
       41,   42,   41,   44,   61,   41,  257,  176,  257,  228,
      230,  229,   50,  148,  231,  257,  327,   58,   59,  232,
       66,  169,  134,   40,   41,   42,  271,   44,   93,   94,
       24,   -1,   -1,  123,   -1,  125,  126,   -1,   95,   -1,
       -1,   58,   59,   -1,   40,   41,   42,   -1,  123,   -1,
       91,  126,   -1,   -1,   40,   41,   -1,   -1,   44,  124,
      125,   -1,   58,   -1,   -1,  257,  258,  259,  260,   -1,
      262,  263,   58,   59,   91,   61,   -1,   -1,  257,  258,
      259,  260,   -1,  262,  263,   40,   41,   42,   -1,   -1,
      282,  148,  149,  150,  151,   91,  288,  289,  290,  291,
      292,  293,  294,  295,  296,  297,  298,  299,  300,  301,
       -1,   -1,   -1,   -1,   -1,  257,   -1,   -1,   -1,  176,
       -1,   -1,   -1,   -1,  303,  304,  305,   -1,  307,  308,
      309,  310,  311,  312,  313,  314,   91,  123,   -1,   -1,
      282,  283,  284,  285,  286,  287,  288,  289,  290,  291,
      292,  293,  294,  295,  296,  297,  298,  299,  300,  301,
       40,   -1,   42,   -1,   -1,   -1,   -1,  257,  258,  259,
      260,   -1,  262,  263,   40,   41,   42,   -1,   44,   -1,
       -1,   -1,  257,  258,  259,  260,   -1,  262,  263,   41,
       -1,   -1,   -1,   59,   -1,   -1,  253,   -1,   -1,  264,
      265,  266,  267,  268,  269,  270,  271,   -1,   -1,   -1,
       41,   -1,   -1,  303,  304,  305,  257,  307,  308,  309,
      310,  311,  312,  313,  314,   91,   -1,   -1,  303,  304,
      305,   -1,  307,  308,  309,  310,  311,  312,  313,  314,
      257,  282,  283,  284,  285,  286,  287,  288,  289,  290,
      291,  292,  293,  294,  295,  296,  297,  298,  299,  300,
      301,  257,   -1,   -1,   -1,  282,  283,  284,  285,  286,
      287,  288,  289,  290,  291,  292,  293,  294,  295,  296,
      297,  298,  299,  300,  301,   -1,   -1,   -1,   -1,   -1,
       -1,   -1,   -1,   -1,   -1,   -1,  282,  283,  284,  285,
      286,  287,  288,  289,  290,  291,  292,  293,  294,  295,
      296,  297,  298,  299,  300,  301,   -1,   -1,   -1,   -1,
       -1,   -1,   -1,   -1,   -1,   -1,   -1,  282,  283,  284,
      285,  286,  287,  288,  289,  290,  291,  292,  293,  294,
      295,  296,  297,  298,  299,  300,  301,   41,   -1,   -1,
       44,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
       -1,   -1,   -1,   -1,   58,   59,   -1,   61,   41,   -1,
      123,   44,   -1,   -1,   -1,   -1,   -1,  257,   -1,   -1,
       -1,   -1,   -1,   -1,   -1,   58,   59,   -1,   61,   -1,
       -1,  257,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
       -1,   -1,  282,  283,  284,  285,  286,  287,  288,  289,
      290,  291,  292,  293,  294,  295,  296,  297,  298,  299,
      300,  301,   -1,   -1,   -1,   -1,  257,   -1,   -1,  123,
      282,  283,  284,  285,  286,  287,  288,  289,  290,  291,
      292,  293,  294,  295,  296,  297,  298,  299,  300,  301,
      123,  282,  283,  284,  285,  286,  287,  288,  289,  290,
      291,  292,  293,  294,  295,  296,  297,  298,  299,  300,
      301,   37,   38,   -1,   40,   41,   42,   43,   44,   45,
       46,   47,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
       -1,   -1,   58,   59,   60,   61,   62,   63,   37,   38,
       -1,   40,   -1,   42,   43,   44,   45,   46,   47,   -1,
       -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
       59,   60,   61,   62,   63,   61,   -1,   93,   94,  282,
      283,  284,  285,  286,  287,  288,  289,  290,  291,  292,
      293,  294,  295,  296,  297,  298,  299,  300,  301,   -1,
       -1,   -1,   91,   -1,   -1,   94,   33,   -1,  124,  125,
       -1,   38,   -1,   40,   -1,   42,   43,   -1,   45,   -1,
       -1,   -1,   -1,   -1,   33,   -1,   -1,   -1,   -1,   38,
       -1,   40,   41,   42,   43,  124,   45,  123,  282,  283,
      284,  285,  286,  287,  288,  289,  290,  291,  292,  293,
      294,  295,  296,  297,  298,  299,  300,  301,   -1,  282,
      283,  284,  285,  286,  287,  288,  289,  290,  291,  292,
      293,  294,  295,  296,  297,  298,  299,  300,  301,   37,
       38,   -1,   -1,   41,   42,   43,   44,   45,   -1,   47,
       -1,   -1,   -1,   -1,   -1,   -1,  123,   -1,   -1,  126,
       58,   59,   60,   61,   62,   63,   -1,   -1,   -1,   -1,
       -1,   -1,   -1,   -1,   -1,   -1,   -1,  126,   -1,   40,
       41,   42,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
       -1,   -1,   -1,   -1,   -1,   93,   94,   58,   -1,   -1,
       -1,   -1,   -1,   -1,   -1,  261,  262,  263,  264,  265,
      266,  267,  268,  269,  270,  271,  272,  273,  274,  275,
      276,  277,  278,  279,  280,  281,  124,  125,   -1,   -1,
       91,   -1,  261,  262,  263,  264,  265,  266,  267,  268,
      269,  270,  271,  272,  273,  274,  275,  276,  277,  278,
      279,  280,  281,   -1,   -1,   -1,  282,  283,  284,  285,
      286,  287,  288,  289,  290,  291,  292,  293,  294,  295,
      296,  297,  298,  299,  300,  301,   37,   38,   -1,   -1,
       41,   42,   43,   44,   45,   -1,   47,   -1,   -1,   -1,
      257,  258,  259,  260,   -1,  262,  263,   58,   59,   60,
       38,   62,   63,   41,   -1,   43,   44,   45,  257,  258,
      259,  260,   -1,  262,  263,   -1,   -1,   -1,   -1,   -1,
       58,   59,   60,   -1,   62,   63,   -1,   -1,   -1,   33,
       -1,   -1,   93,   94,   38,   -1,   40,   38,   42,   43,
       41,   45,   43,   44,   45,   -1,   -1,   -1,   -1,   -1,
       -1,   -1,   -1,   -1,   -1,   93,   94,   58,   59,   60,
       -1,   62,   63,  124,  125,   -1,  264,  265,  266,  267,
      268,  269,  270,  271,  272,  273,  274,  275,  276,  277,
      278,  279,  280,  281,   -1,   38,  124,  125,   41,   93,
       -1,   44,   93,   94,   38,   -1,  257,   41,   -1,   -1,
       44,   -1,   -1,   -1,   -1,   58,   59,   60,   41,   62,
       63,   44,   -1,   -1,   58,   59,   60,   -1,   62,   63,
       -1,   -1,  126,  124,  125,   58,   59,   -1,   -1,   -1,
       63,   38,   -1,   -1,   41,   -1,   -1,   44,   -1,   -1,
       93,   94,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   93,
       94,   58,   59,   60,   -1,   62,   63,   -1,   -1,   -1,
       93,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
       -1,  124,  125,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
      124,  125,   -1,   -1,   -1,   -1,   93,   94,   -1,   -1,
       -1,   38,  125,   -1,   41,   -1,   -1,   44,   -1,   -1,
       -1,   -1,   -1,  264,  265,  266,  267,  268,  269,  270,
      271,   58,   59,   60,   -1,   62,   63,  124,  125,   38,
       -1,   -1,   41,   -1,   -1,   44,  264,  265,  266,  267,
      268,  269,  270,  271,   -1,   -1,   -1,   -1,   -1,   58,
       59,   60,   -1,   62,   63,   -1,   93,   94,   -1,   -1,
       -1,   -1,   -1,  257,  258,  259,  260,   -1,  262,  263,
       -1,   -1,   -1,  264,  265,  266,  267,  268,  269,  270,
      271,   -1,   -1,   -1,   93,   94,   -1,  124,  125,   38,
       -1,   -1,   41,   -1,   -1,   44,   -1,   -1,   -1,   -1,
       -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   58,
       59,   60,   -1,   62,   63,  124,  125,   -1,   -1,   -1,
       -1,  264,  265,  266,  267,  268,  269,  270,  271,   -1,
      264,  265,  266,  267,  268,  269,  270,  271,   -1,   -1,
       38,   -1,   -1,   41,   93,   94,   44,  270,  271,   -1,
       -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
       58,   59,   60,   -1,   62,   63,   -1,  264,  265,  266,
      267,  268,  269,  270,  271,  124,  125,   -1,   -1,   -1,
       38,   -1,   -1,   41,   -1,   -1,   44,   38,   -1,   -1,
       41,   -1,   -1,   44,   -1,   93,   94,   -1,   -1,   -1,
       58,   59,   60,   -1,   62,   63,   -1,   58,   59,   -1,
       -1,   33,   63,   -1,   -1,   -1,   38,   -1,   40,   -1,
       42,   43,   -1,   45,   -1,   -1,  124,  125,   -1,  266,
      267,  268,  269,  270,  271,   93,   94,   59,   -1,   -1,
       -1,   -1,   93,   94,   38,   -1,   -1,   41,   -1,   -1,
       44,   -1,   -1,   -1,   -1,   -1,   -1,  266,  267,  268,
      269,  270,  271,   -1,   58,   59,  124,  125,   -1,   63,
       -1,   -1,   38,  124,  125,   41,   -1,   -1,   44,   -1,
       -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   38,   -1,
       -1,   41,   58,   59,   44,   -1,   -1,   63,   -1,   93,
       94,   -1,   -1,   -1,  126,   -1,   -1,   -1,   58,   59,
       -1,   -1,   -1,   63,   -1,   -1,   -1,  266,  267,  268,
      269,  270,  271,   -1,   -1,   -1,   -1,   93,   94,   33,
      124,  125,   -1,   -1,   38,   -1,   40,   -1,   42,   43,
       33,   45,   -1,   93,   94,   38,   -1,   40,   41,   42,
       43,   -1,   45,   -1,   -1,   59,   -1,   -1,  124,  125,
       -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,  266,  267,
      268,  269,  270,  271,  124,  125,   -1,   -1,   -1,   33,
       -1,   -1,   -1,   -1,   38,   -1,   40,   33,   42,   43,
       -1,   45,   38,   -1,   40,   33,   42,   43,   -1,   45,
       38,   -1,   40,   -1,   42,   43,   -1,   45,  266,  267,
      268,  269,  270,  271,   -1,   -1,   33,  268,  269,  270,
      271,   38,  126,   40,   -1,   42,   43,   -1,   45,   -1,
       -1,   -1,   -1,  126,   -1,  257,  258,  259,  260,   93,
      262,  263,   -1,   33,   -1,   -1,   41,   93,   38,   44,
       40,   -1,   42,   43,   -1,   45,   -1,   -1,   -1,   -1,
       -1,   -1,   -1,   58,   59,   -1,   -1,   41,   63,   -1,
       44,   -1,  126,   -1,  268,  269,  270,  271,   -1,   41,
      126,   -1,   44,   -1,   58,   59,   -1,   -1,  126,   63,
       41,   -1,   -1,   44,   94,   95,   58,   59,   93,   94,
       -1,   63,  268,  269,  270,  271,   -1,   58,   59,  126,
       -1,   -1,   63,   -1,  125,   -1,   -1,   -1,   -1,   93,
      270,  271,   -1,   41,   -1,   -1,   44,   -1,   -1,  124,
      125,   93,   94,   -1,   -1,   -1,  126,   -1,   -1,   -1,
       58,   59,   93,   -1,  144,   63,   -1,   -1,   -1,   -1,
      124,  125,   -1,  257,  258,  259,  260,   -1,  262,  263,
      125,   -1,  124,  125,  257,  258,  259,  260,   -1,  262,
      263,   -1,   -1,  124,  125,   93,  176,   -1,  178,   -1,
       -1,   -1,  182,  183,  130,  131,  132,  133,   -1,  135,
      136,  137,   -1,  139,  140,   -1,   -1,  143,   -1,   -1,
      200,  201,   -1,  257,  258,  259,  260,  125,  262,  263,
       -1,  257,  258,  259,  260,   -1,  262,  263,   -1,  257,
      258,  259,  260,   -1,  262,  263,   -1,   -1,   -1,   -1,
       -1,   -1,   -1,  233,   -1,   -1,   -1,   -1,   -1,   -1,
      257,  258,  259,  260,  244,  262,  263,  282,  283,  284,
      285,  286,  287,  288,  289,  290,  291,  292,  293,  294,
      295,  296,  297,  298,  299,  300,  301,  257,  258,  259,
      260,  282,  262,  263,   -1,  270,  271,  288,  289,  290,
      291,  292,  293,  294,  295,  296,  297,  298,  299,  300,
      301,   -1,   -1,   -1,  240,   -1,  270,  271,   -1,   -1,
       -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,  270,  271,
       -1,   -1,   -1,   -1,   -1,   -1,   -1,  282,   -1,  270,
      271,  321,   -1,  288,  289,  290,  291,  292,  293,  294,
      295,  296,  297,  298,  299,  300,  301,   -1,   -1,   -1,
       -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
       -1,   -1,  270,  271,  282,  283,  284,  285,  286,  287,
      288,  289,  290,  291,  292,  293,  294,  295,  296,  297,
      298,  299,  300,  301,  302,  282,   -1,   -1,   -1,   -1,
       -1,  288,  289,  290,  291,  292,  293,  294,  295,  296,
      297,  298,  299,  300,  301,
    };class CzybCompile
    {
    private:/*&ordm;&Iacute;YACC&Iuml;à&sup1;&Oslash;*/
      #define YYFINAL 24
    #define YYMAXTOKEN 314
      #define YYMAXDEPTH 600
    #define YYSTACKSIZE 600
      #define yystacksize YYSTACKSIZE
        #define YYTABLESIZE 2271

    #define SYMBOLNAMESIZE 20 //±ê&Ecirc;&frac34;·&ucirc;&micro;&Auml;×&icirc;&acute;ó&cedil;&ouml;&Ecirc;&yacute;    typedef struct tagTokenRecord //
    {
          int tokenval;                 //&sup1;&Oslash;&frac14;ü×&Ouml;
          char idstring[SYMBOLNAMESIZE];//ID&micro;&Auml;×&Ouml;·&ucirc;&acute;&reg;(&raquo;ò×&Ouml;·&ucirc;)
          int Place; //·&ucirc;&ordm;&Aring;&Ocirc;&Uacute;·&ucirc;&ordm;&Aring;±í&Ouml;&ETH;&micro;&Auml;&ETH;ò&ordm;&Aring;
    int Chain; //&Atilde;è&Ecirc;&ouml;&Auml;&sup3;&Euml;&Auml;&Ocirc;&ordf;&Ecirc;&frac12;&micro;&Auml;&Aacute;&acute;&Ecirc;×&micro;&Oslash;&Ouml;·
    int LoopStart; //&Ntilde;&shy;&raquo;·&micro;&Auml;&iquest;&ordf;&Ecirc;&frac14;&Icirc;&raquo;&Ouml;&Atilde;
    BYTE Type; //&Ecirc;&yacute;&frac34;&Yacute;&Agrave;à&ETH;&Iacute;
    BYTE DIM; //&Ecirc;&yacute;×é&Icirc;&not;&Ecirc;&yacute;
    int ArrSum;
    int Varpart;
    float TypeValue; //&Ouml;&micro;
        } YYSTYPE, *LPYYSTYPE;

      int yydebug;
    int yynerrs;
      int yyerrflag;
    int yychar;
      short *yyssp; YYSTYPE *yyvsp;
      YYSTYPE yyval;
    YYSTYPE yylval; short yyss[YYSTACKSIZE];
    YYSTYPE yyvs[YYSTACKSIZE];
      
        typedef map<string, int> tagKeyWordMap;    tagKeyWordMap m_KeyMap;  //&sup1;&Oslash;&frac14;ü×&Ouml;&Euml;÷&Ograve;&yacute;±í typedef stack<char> tagStack;  //&para;&Ntilde;&Otilde;&raquo;
      private:/*&ordm;&Iacute;&Ocirc;&shy;&sup3;&Igrave;&ETH;ò×&Ouml;·&ucirc;&Iuml;à&sup1;&Oslash;*/

        CString m_SourceStr;
        LPSTR lpStart, lpCurrent, lpBuffer;
        int iStrLength;
        int iLineIndex;
        int iCharIndex;
    enum tagCommentKind
    {
    ckNull, //&Icirc;&THORN;
    ckOneLine, //&Ograve;&raquo;&ETH;&ETH;×&cent;&Ecirc;&Iacute;//
    ckCpp, //C++×&cent;&Ecirc;&Iacute;/*...*/
    ckPascal //Pascal×&cent;&Ecirc;&Iacute;{...}
    }CommentKind; enum tagSymbolType
    {
    stBlank,  //&iquest;&Otilde;&cedil;&ntilde;
    stID,  //±ê&Ecirc;&frac34;·&ucirc;A..Z,a..z,_
    stSign,  //·&ucirc;&ordm;&Aring;
    stString,  //×&Ouml;·&ucirc;&acute;&reg;
    stChar, //&micro;&yen;&cedil;&ouml;×&Ouml;·&ucirc;
    stNumber //&Ecirc;&yacute;×&Ouml;0..9
    }SymbolType;  public:
       CzybCompile();
    virtual ~CzybCompile();
      int Compile();
      void GetSourceStr(const char* lp);
    private: /*·&Ouml;&sup3;&Igrave;&ETH;ò±í&ordm;&Iacute;·&ucirc;&ordm;&Aring;±í*/ typedef struct tagProgram   //·&Ouml;&sup3;&Igrave;&ETH;ò&frac12;á&sup1;&sup1;
    {
    int outern; //&Iacute;&acirc;&sup2;&atilde;·&Ouml;&sup3;&Igrave;&ETH;ò&micro;&Auml;±à&ordm;&Aring;
    int ecount; //&micro;&Ccedil;&frac14;&Ccedil;&Iuml;&icirc;&micro;&Auml;&cedil;&ouml;&Ecirc;&yacute;
    int pointer; //·&Ouml;&sup3;&Igrave;&ETH;ò·&ucirc;&ordm;&Aring;±í&micro;&Auml;&ETH;ò&ordm;&Aring;
    }PROGRAM; #define PROGRAMTABLESIZE 100 //·&Ouml;&sup3;&Igrave;&ETH;ò&micro;&Auml;&acute;ó&ETH;&iexcl;
    #define SYMBOLTABLESIZE 1000 //·&ucirc;&ordm;&Aring;±í&micro;&Auml;&acute;ó&ETH;&iexcl;
    PROGRAM ProgramTable[PROGRAMTABLESIZE]; //·&Ouml;&sup3;&Igrave;&ETH;ò±í typedef struct tagSymbol //·&ucirc;&ordm;&Aring;±í&frac12;á&sup1;&sup1;
    {
    char name[SYMBOLNAMESIZE]; //&Atilde;&ucirc;×&Ouml;
    bool def; //&Ecirc;&Ccedil;·&ntilde;&para;¨&Ograve;&aring;
    bool IsTemp; //&Ecirc;&Ccedil;·&ntilde;&Ecirc;&Ccedil;&Aacute;&Ugrave;&Ecirc;±±&auml;&Aacute;&iquest;
    BYTE cat; //·&ucirc;&ordm;&Aring;&Ouml;&Ouml;&Ecirc;&ocirc;
    BYTE type; //·&ucirc;&ordm;&Aring;&Agrave;à&ETH;&Iacute;
    int addr; //&micro;&Uacute;&Ograve;&raquo;&cedil;&ouml;&Euml;&Auml;&Ocirc;&ordf;&Ecirc;&frac12;&micro;&Auml;&ETH;ò&ordm;&Aring;&raquo;ò&Otilde;&szlig;·&ucirc;&ordm;&Aring;±í&micro;&Auml;&ETH;ò&ordm;&Aring;&pound;&not;
    int *Vector; //&Ecirc;&yacute;×é&micro;&Auml;&Auml;&Uacute;&Ccedil;é&Iuml;ò&Aacute;&iquest;--1:&Icirc;&not;&Ecirc;&yacute;&pound;&not;2:&Eacute;&Iuml;&frac12;&ccedil;
    }SYMBOL; SYMBOL SymbolTable[SYMBOLTABLESIZE];//·&ucirc;&ordm;&Aring;±í int TOPENT;  //&Aacute;&Ugrave;&Ecirc;±&sup1;¤×÷&Otilde;&raquo;&micro;&Auml;&Otilde;&raquo;&para;&yen;
    int LASENT;  //·&ucirc;&ordm;&Aring;±í&micro;&Auml;&micro;±&Ccedil;°×&icirc;&Auml;&copy;&micro;&Ccedil;&frac14;&Ccedil;&Iuml;&icirc;
    int CURRBL;  //&micro;±&Ccedil;°&Otilde;&yacute;&acute;&brvbar;&Agrave;í&micro;&Auml;·&Ouml;&sup3;&Igrave;&ETH;ò&micro;&Auml;±à&ordm;&Aring;
    int LASTBL;  //&Ograve;&Ntilde;&acute;&brvbar;&Agrave;í&Iacute;ê&micro;&Auml;×&icirc;&cedil;&szlig;&sup2;&atilde;·&Ouml;&sup3;&Igrave;&ETH;ò&micro;&Auml;±à&ordm;&Aring;  private:
    #define QUADRUPLELISTSIZE 1000  //&para;¨&Ograve;&aring;&Euml;&Auml;&Ocirc;&ordf;&Ecirc;§&Aacute;&ETH;±í&micro;&Auml;&acute;ó&ETH;&iexcl;
    int NXQ;//&Oacute;&Atilde;&Oacute;&Uacute;&Ouml;&cedil;&Ecirc;&frac34;&Euml;ù&Ograve;&ordf;&sup2;ú&Eacute;ú&micro;&Auml;&Iuml;&Acirc;&Ograve;&raquo;&cedil;&ouml;&Euml;&Auml;&Ocirc;&ordf;&Ecirc;&frac12;&micro;&Auml;&ETH;ò&ordm;&Aring;&iexcl;&pound;
    typedef struct tagQuadruple  //&para;¨&Ograve;&aring;&Euml;&Auml;&Ocirc;&ordf;&Ecirc;&frac12;&micro;&Auml;&frac12;á&sup1;&sup1;&iexcl;&pound;
    {
    int qOperate;
    int qArg1Type;
    float qArg1;
    int qArg2Type;
    float qArg2;
    int qResultType;
    int qResult;
    } QUADRUPLE,*LPQUADRUPLE; QUADRUPLE QuadrupleList[QUADRUPLELISTSIZE]; float Arg1Value, Arg2Value; //&sup3;&pound;&Ecirc;&yacute;&micro;&Auml;&Ouml;&micro;
    bool IsCon1Value, IsCon2Value;//&Ecirc;&Ccedil;&sup3;&pound;&Ecirc;&yacute;

    QUADRUPLE TempQuadruple[100]; //&Aacute;&Ugrave;&Ecirc;±&Euml;&Auml;&Ocirc;&ordf;&Ecirc;&frac12;
    int QuadrupleIndex; //&Aacute;&Ugrave;&Ecirc;±&Euml;&Auml;&Ocirc;&ordf;&Ecirc;&frac12;&micro;&Auml;&ETH;ò&ordm;&Aring;
    bool CanAddToTemp;
    void OutFormTempQuadruple(); //&acute;&Oacute;&Aacute;&Ugrave;&Ecirc;±&Euml;&Auml;&Ocirc;&ordf;&Ecirc;&frac12;&Ouml;&ETH;&Egrave;&iexcl;&sup3;&ouml;&Euml;&Auml;&Ocirc;&ordf;&Ecirc;&frac12; typedef struct tagCaseIndex
    {
    int ciTempExp;    //&Ograve;&ordf;±&Egrave;&frac12;&Iuml;&micro;&Auml;±í&acute;&iuml;&Ecirc;&frac12;&micro;&Auml;&micro;&Oslash;&Ouml;·&iexcl;&pound;
    int ciQueueIndex; //CaseQueueTable&micro;&Auml;&AElig;&eth;&Ecirc;&frac14;&Icirc;&raquo;&Ouml;&Atilde;&iexcl;&pound;
    int ciDefaultAddr;//switch&Oacute;&iuml;&frac34;&auml;&Ouml;&ETH;default&Oacute;&iuml;&frac34;&auml;&Oacute;&brvbar;&Igrave;&oslash;×&ordf;&micro;&Auml;&Icirc;&raquo;&Ouml;&Atilde;&iexcl;&pound;
    } CASEINDEX, *LPCASEINDEX;

    CASEINDEX CaseIndexTable[10];
    int CaseIndex;//tagCaseIndex&micro;&Auml;&Euml;÷&Ograve;&yacute; QUADRUPLE CaseQueueTable[100];
    int QueueIndex;//CaseQueueTable&micro;&Auml;&Euml;÷&Ograve;&yacute;
    bool CanAddToCaseQueue;
    int AddToCaseQueue(int Token, float Ci, int Pi);
    void OutFromCaseQueue(); typedef struct tagLoopQueue
    {
    int lqContinue;
    int lqBreak;
    } LOOPQUEUE, *LPLOOPQUEUE;
    LOOPQUEUE LoopTable[10];
    int LoopIndex; int InsideLabIndex; void yyaction(int yyruleno);  //&para;&macr;×÷±í
      void GoToError();  //&acute;í&Icirc;ó
      int yyparse();  //&Oacute;&iuml;·¨·&Ouml;&Icirc;&ouml;
      void yylex(LPYYSTYPE yystype);  //&acute;&Ecirc;·¨·&Ouml;&Icirc;&ouml;
      void FindToken(LPYYSTYPE yystype); //&sup2;é&Otilde;&Ograve;&sup1;&Oslash;&frac14;ü×&Ouml;
    void yyerror(char *s);  //&acute;í&Icirc;ó
    /*&Ograve;&Ocirc;Name&Icirc;&ordf;&Atilde;&ucirc;×&Ouml;&Ocirc;&Uacute;·&ucirc;&ordm;&Aring;±í&Ouml;&ETH;&micro;&Ccedil;&frac14;&Ccedil;&ETH;&Acirc;&micro;&Auml;&Ograve;&raquo;&Iuml;&icirc;&pound;&not;·&micro;&raquo;&Oslash;&Ouml;&micro;&Icirc;&ordf;&cedil;&Atilde;&Iuml;&icirc;&micro;&Auml;&ETH;ò&ordm;&Aring;*/
    int Enter(char *Name);
    int Entry(char *Name);//&Ograve;&Ocirc;Name&Icirc;&ordf;&Atilde;&ucirc;×&Ouml;&sup2;é&pound;&not;&Igrave;&icirc;·&ucirc;&ordm;&Aring;±í
    int LookUpWhenDefine(char *Name);   //&Ocirc;&Uacute;&para;¨&Ograve;&aring;&Ecirc;±&Ograve;&Ocirc;Name&Icirc;&ordf;&Atilde;&ucirc;×&Ouml;&sup2;é·&ucirc;&ordm;&Aring;±í
    int LookUpWhenNotDefine(char *Name);//&sup2;&raquo;&Ocirc;&Uacute;&para;¨&Ograve;&aring;&Ecirc;±&Ograve;&Ocirc;Name&Icirc;&ordf;&Atilde;&ucirc;×&Ouml;&sup2;é·&ucirc;&ordm;&Aring;±í
    int NewTemp(int Type); //&sup2;ú&Eacute;ú&Aacute;&Ugrave;&Ecirc;±±&auml;&Aacute;&iquest;&pound;&not;&Atilde;&iquest;&acute;&Icirc;&micro;÷&Oacute;&Atilde;&para;&frac14;&para;¨&Ograve;&aring;&Ograve;&raquo;&cedil;&ouml;&ETH;&Acirc;&micro;&Auml;&Aacute;&Ugrave;&Ecirc;±±&auml;&Aacute;&iquest;&pound;&not;·&micro;&raquo;&Oslash;&Ouml;&micro;&Icirc;&ordf;&cedil;&Atilde;±&auml;&Aacute;&iquest;&micro;&Auml;±à&ordm;&Aring;&iexcl;&pound; /*op&Icirc;&ordf;&Ograve;&raquo;&cedil;&ouml;&para;&thorn;&Ocirc;&ordf;(&Ograve;&sup2;&iquest;&Eacute;&Ograve;&Ocirc;&Ecirc;&Ccedil;&Ograve;&raquo;&Ocirc;&ordf;&raquo;ò&Aacute;&atilde;&Ocirc;&ordf;)&Ocirc;&Euml;&Euml;&atilde;·&ucirc;
    arg1,arg2·&Ouml;±&eth;&Icirc;&acute;&Euml;ü&micro;&Auml;&Aacute;&frac12;&cedil;&ouml;&Ocirc;&Euml;&Euml;&atilde;&para;&Ocirc;&Iuml;ó*/
    int Trip(int op, int arg1type, float arg1, int arg2type, float arg2, int resulttype, int result);//&sup2;ú&Eacute;ú&Euml;&Auml;&Ocirc;&ordf;&Ecirc;&frac12; /*&frac12;&laquo;&Aacute;&not;&Ecirc;×'&Ouml;&cedil;&Otilde;&euml;'·&Ouml;±&eth;&Icirc;&ordf;p1&ordm;&Iacute;p2&micro;&Auml;&Aacute;&frac12;&Igrave;&otilde;&Aacute;&acute;&ordm;&Iuml;&sup2;&cent;&Icirc;&ordf;&Ograve;&raquo;&Igrave;&otilde;&pound;&not;&sup2;&cent;·&micro;&raquo;&Oslash;&ETH;&Acirc;&Aacute;&acute;&micro;&Auml;&Aacute;&acute;&Ecirc;×'&Ouml;&cedil;&Otilde;&euml;'
    &acute;&Euml;&acute;&brvbar;&micro;&Auml;'&Ouml;&cedil;&Otilde;&euml;'&Ecirc;&micro;&frac14;&Ecirc;&Eacute;&Iuml;&Ecirc;&Ccedil;&Euml;&Auml;&Ocirc;&ordf;&Ecirc;&frac12;&micro;&Auml;&ETH;ò&ordm;&Aring;&pound;&not;&Oacute;&brvbar;&Icirc;&ordf;&Otilde;&ucirc;&Ecirc;&yacute;&Ouml;&micro;*/
      int Merge(int p1, int p2);

    /*&Oacute;&Atilde;&Euml;&Auml;&Ocirc;&ordf;&Ecirc;&frac12;&ETH;ò&ordm;&Aring;t&raquo;&Oslash;&Igrave;&icirc;&Ograve;&Ocirc;p&Icirc;&ordf;&Ecirc;×&micro;&Auml;&Aacute;&acute;&pound;&not;&frac12;&laquo;&Aacute;&acute;&Ouml;&ETH;&Atilde;&iquest;&cedil;&ouml;&Euml;&Auml;&Ocirc;&ordf;&Ecirc;&frac12;&micro;&Auml;qResult&Oacute;ò&cedil;&Auml;&Icirc;&ordf;t&micro;&Auml;&Ouml;&micro;*/
    void BackPatch(int p, int t); int FindLabel(char* Name);//&sup2;é&Otilde;&Ograve;Name&micro;&Auml;&Igrave;&oslash;×&ordf;±í&Ecirc;&frac34;·&ucirc;// typedef struct tagArray
    private:
    // int ArrayIndexTable[10];
    // int ArrayIndex;
    // int ArrayVectorTable[100];
    // int ArrayVector;
    int ArrCharPoint;
    int ArrIntPoint;
    int ArrFloatPoint;
    int TempCharPoint;
    int TempIntPoint;
    int TempFloatPoint;
    // int ArrayTable[100];
    // int ArrayIndex;
    int Access_C(int No, int k);//&acute;&Oacute;·&ucirc;&ordm;&Aring;±í&micro;&Uacute;No&Iuml;&icirc;&micro;&Auml;Addr&Oacute;ò&Euml;ù&Ouml;&cedil;&Iuml;ò&Auml;&Uacute;&Ccedil;é&Iuml;ò&Aacute;&iquest;&Ouml;&ETH;&Egrave;&iexcl;&Ouml;&micro;
    int Access_a(int No); //NO&ordm;&not;&Ograve;&aring;&Iacute;&not;&Eacute;&Iuml;&pound;&not;&Egrave;&iexcl;&Auml;&Uacute;&Ccedil;é&Iuml;ò&Aacute;&iquest;&Ouml;&ETH;&micro;&Auml;a&Ouml;&micro;
    int Access_d(int No, int k);//NO&ordm;&not;&Ograve;&aring;&Iacute;&not;&Eacute;&Iuml;&pound;&not;&Egrave;&iexcl;&Ecirc;&yacute;×é&micro;&Auml;&micro;&Uacute;k&Icirc;&not;&frac12;&ccedil;&sup2;&icirc; private:
    void DualityExpr(YYSTYPE &Expr, int TokenVal, YYSTYPE *Expr1, YYSTYPE *Expr2);//&para;&thorn;&Ocirc;&ordf;&Ocirc;&Euml;&Euml;&atilde;
    void FillArrMSG_C(int VarNo); //&frac14;&AElig;&Euml;&atilde;&sup2;&cent;&Igrave;&icirc;&ETH;&acute;·&ucirc;&ordm;&Aring;±í&micro;&Uacute;VarNo&micro;&Ccedil;&frac14;&Ccedil;&Iuml;&icirc;Addr&Oacute;ò&Euml;ù&Ouml;&cedil;&Ecirc;&frac34;&micro;&Auml;&Auml;&Uacute;&Ccedil;é&Iuml;ò&Aacute;&iquest;&Ouml;&ETH;&micro;&Auml;C&Ouml;&micro;
    void FillVarType(int VarNo, int VarType);//&frac12;&laquo;&Agrave;à&ETH;&Iacute;&ETH;&Aring;&Iuml;&cent;VarType&Igrave;&icirc;&ETH;&acute;&micro;&frac12;&micro;&Uacute;VarNo&micro;&Ccedil;&frac14;&Ccedil;&Iuml;&icirc;&Ouml;&reg;&Agrave;à&ETH;&Iacute;&Oacute;ò
    void YaccInitialize(); //Yacc&sup2;&Icirc;&Ecirc;&yacute;&sup3;&otilde;&Ecirc;&frac14;&raquo;&macr;
    int AddLabDef(char* Name, int Addr); //&Igrave;í&frac14;&Oacute;&Igrave;&oslash;×&ordf;±ê&ordm;&Aring;±í
    void LabelDef(char* Name); //&micro;±&sup3;&ouml;&Iuml;&Ouml;&Igrave;&oslash;×&ordf;±ê&ordm;&Aring;&para;¨&Ograve;&aring;&Ecirc;±
    void GotoLabel(char* Name); //&micro;±&sup3;&ouml;&Iuml;&Ouml;&Igrave;&oslash;×&ordf;&Oacute;&iuml;&frac34;&auml;&Ecirc;±
    void SetStartChar(); //&Eacute;è&Ouml;&Atilde;&iquest;&ordf;&Ecirc;&frac14;&para;&macr;×÷
    void SetEndChar(); //&Eacute;è&Ouml;&Atilde;&frac12;á&Ecirc;&oslash;&para;&macr;×÷
      void SymbolInitialize(); //·&Ouml;&sup3;&Igrave;&ETH;ò·&ucirc;&ordm;&Aring;±í&sup3;&otilde;&Ecirc;&frac14;&raquo;&macr; private:
    void GoToWarning();
    int GetArgType(int Addr);
    void ClearTemp();
    int SetOperation(YYSTYPE *yyvsp1, YYSTYPE *yyvsp2, YYSTYPE *yyvsp3);
    bool GetSymbolDef(int No);
    char* GetSymbolName(int No);
    };
        
    #endif // !defined(AFX_ZYBCOMPILE_H__22240CB0_9C1D_4E54_AB23_28637992CD65__INCLUDED_)
      

  6.   

    // zybCompile.cpp: implementation of the CzybCompile class.
    //
    //////////////////////////////////////////////////////////////////////#include "stdafx.h"
    #include "Compiler.h"
    #include "zybCompile.h"#ifdef _DEBUG
    #undef THIS_FILE
    static char THIS_FILE[]=__FILE__;
    #define new DEBUG_NEW
    #endif//////////////////////////////////////////////////////////////////////
    // Construction/Destruction
    //////////////////////////////////////////////////////////////////////CzybCompile::CzybCompile()
    {
      m_KeyMap[";"] = ';';
      m_KeyMap["{"] = '{';
      m_KeyMap["}"] = '}';
      m_KeyMap[","] = ',';
      m_KeyMap[":"] = ':';
      m_KeyMap["="] = '=';
      m_KeyMap["("] = '(';
      m_KeyMap[")"] = ')';
      m_KeyMap["["] = '[';
      m_KeyMap["]"] = ']';
      m_KeyMap["."] = '.';
      m_KeyMap["&"] = '&';
      m_KeyMap["!"] = '!';
      m_KeyMap["~"] = '~';
      m_KeyMap["-"] = '-';
      m_KeyMap["+"] = '+';
      m_KeyMap["*"] = '*';
      m_KeyMap["/"] = '/';
      m_KeyMap["%"] = '%';
      m_KeyMap["<"] = '<';
      m_KeyMap[">"] = '>';
      m_KeyMap["^"] = '^';
      m_KeyMap["|"] = '|';
      m_KeyMap["?"] = '?';
      m_KeyMap["->"] = _PTR_OP;
      m_KeyMap["++"] = _INC_OP;
      m_KeyMap["--"] = _DEC_OP;
      m_KeyMap["<<"] = _LEFT_OP;
      m_KeyMap[">>"] = _RIGHT_OP;
      m_KeyMap["<="] = _LE_OP;
      m_KeyMap[">="] = _GE_OP;
      m_KeyMap["=="] = _EQ_OP;
      m_KeyMap["!="] = _NE_OP;
      m_KeyMap["&&"] = _AND_OP;
      m_KeyMap["||"] = _OR_OP;
      m_KeyMap["*="] = _MUL_ASSIGN;
      m_KeyMap["/="] = _DIV_ASSIGN;
      m_KeyMap["%="] = _MOD_ASSIGN;
      m_KeyMap["+="] = _ADD_ASSIGN;
      m_KeyMap["-="] = _SUB_ASSIGN;
      m_KeyMap["<<="] = _LEFT_ASSIGN;
      m_KeyMap[">>="] = _RIGHT_ASSIGN;
      m_KeyMap["&="] = _AND_ASSIGN;
      m_KeyMap["|="] = _OR_ASSIGN;
    //  m_KeyMap[""] = _TYPE_NAME;
      m_KeyMap["sizeof"] = _SIZEOF;
      m_KeyMap["typedef"] = _TYPEDEF;
      m_KeyMap["extern"] = _EXTERN;
      m_KeyMap["static"] = _STATIC;
      m_KeyMap["auto"] = _AUTO;
      m_KeyMap["register"] = _REGISTER;
      m_KeyMap["char"] = _CHAR;
      m_KeyMap["short"] = _SHORT;
      m_KeyMap["int"] = _INT;
      m_KeyMap["long"] = _LONG;
      m_KeyMap["signed"] = _SIGNED;
      m_KeyMap["unsigned"] = _UNSIGNED;
      m_KeyMap["float"] = _FLOAT;
      m_KeyMap["double"] = _DOUBLE;
      m_KeyMap["const"] = _CONST;
      m_KeyMap["volatile"] = _VOLATILE;
      m_KeyMap["void"] = _VOID;
      m_KeyMap["struct"] = _STRUCT;
      m_KeyMap["union"] = _UNION;
      m_KeyMap["enum"] = _ENUM;
      m_KeyMap["..."] = _ELLIPSIS;
      m_KeyMap["case"] = _CASE;
      m_KeyMap["default"] = _DEFAULT;
      m_KeyMap["if"] = _IF;
      m_KeyMap["else"] = _ELSE;
      m_KeyMap["switch"] = _SWITCH;
      m_KeyMap["while"] = _WHILE;
      m_KeyMap["do"] = _DO;
      m_KeyMap["for"] = _FOR;
      m_KeyMap["goto"] = _GOTO;
      m_KeyMap["continue"] = _CONTINUE;
      m_KeyMap["break"] = _BREAK;
      m_KeyMap["return"] = _RETURN;
    }CzybCompile::~CzybCompile()
    {}void CzybCompile::yyerror(char *s)
    {}int CzybCompile::yyparse()
    {
        register int yym, yyn, yystate;    yynerrs = 0;
        yyerrflag = 0;
        yychar = (-1);    yyssp = yyss;
        yyvsp = yyvs;
        *yyssp = yystate = 0;yyloop:
        if (yyn = yydefred[yystate]) goto yyreduce;
        if (yychar < 0)
        {
    yylex(&yylval);
            if ((yychar = yylval.tokenval) < 0) yychar = 0;
    if (yychar == '{') //&frac14;ì&sup2;&acirc;&micro;&frac12;&Ograve;&raquo;&cedil;&ouml;{·&ucirc;&ordm;&Aring;
    {
    SetStartChar();  
    /* }else if(yychar == ';')
    {
    ClearTemp();*/
    }
        }
        if ((yyn = yysindex[yystate]) && (yyn += yychar) >= 0 &&
                yyn <= YYTABLESIZE && yycheck[yyn] == yychar)
        {
            if (yyssp >= yyss + yystacksize - 1)
            {
                goto yyoverflow;
            }
            *++yyssp = yystate = yytable[yyn];
            *++yyvsp = yylval;
            yychar = (-1);
            if (yyerrflag > 0)  --yyerrflag;
            goto yyloop;
        }
        if ((yyn = yyrindex[yystate]) && (yyn += yychar) >= 0 &&
                yyn <= YYTABLESIZE && yycheck[yyn] == yychar)
        {
            yyn = yytable[yyn];
            goto yyreduce;
        }
        if (yyerrflag) goto yyinrecovery;
        yyerror("syntax error");
        ++yynerrs;
    yyinrecovery:
        if (yyerrflag < 3)
        {
            yyerrflag = 3;
            for (;;)
            {
                if ((yyn = yysindex[*yyssp]) && (yyn += _YYERRCODE) >= 0 &&
                        yyn <= YYTABLESIZE && yycheck[yyn] == _YYERRCODE)
                {
                    if (yyssp >= yyss + yystacksize - 1)
                    {
                        goto yyoverflow;
                    }
                    *++yyssp = yystate = yytable[yyn];
                    *++yyvsp = yylval;
                    goto yyloop;
                }
                else
                {
                    if (yyssp <= yyss) goto yyabort;
                    --yyssp;
                    --yyvsp;
                }
            }
        }
        else
        {
            if (yychar == 0) goto yyabort;
            yychar = (-1);
            goto yyloop;
        }
    yyreduce:
        yym = yylen[yyn];
        yyval = yyvsp[1-yym];
    yyaction(yyn);
        yyssp -= yym;
        yystate = *yyssp;
        yyvsp -= yym;
        yym = yylhs[yyn];
        if (yystate == 0 && yym == 0)
        {
            yystate = YYFINAL;
            *++yyssp = YYFINAL;
            *++yyvsp = yyval;
            if (yychar < 0)
            {
    yylex(&yylval);
                if ((yychar = yylval.tokenval) < 0) yychar = 0;
            }
            if (yychar == 0) goto yyaccept;
            goto yyloop;
        }
        if ((yyn = yygindex[yym]) && (yyn += yystate) >= 0 &&
                yyn <= YYTABLESIZE && yycheck[yyn] == yystate)
            yystate = yytable[yyn];
        else
            yystate = yydgoto[yym];
        if (yyssp >= yyss + yystacksize - 1)
        {
            goto yyoverflow;
        }
        *++yyssp = yystate;
        *++yyvsp = yyval;
        goto yyloop;
    yyoverflow:
        yyerror("yacc stack overflow");
    yyabort:
        return (1);
    yyaccept:
        return (0);
    }void CzybCompile::yylex(LPYYSTYPE yystype)
    {
    boolean TokenFlag = false;
      while (lpCurrent < lpBuffer + iStrLength)
      {
        if (CommentKind == ckCpp)//&Egrave;&ccedil;&sup1;&ucirc;&Ecirc;&Ccedil;C++×&cent;&Ecirc;&Iacute;/*
        {
          if ((*lpCurrent == '*') && (*(lpCurrent + 1) == '/'))
          {
            CommentKind = ckNull;
            lpCurrent++;
          };
          lpCurrent++;
          continue;
        };
    if ((*lpCurrent == 13) && (*(lpCurrent + 1) == 10))
    {
    iLineIndex++;
    iCharIndex = 0;
    if (CommentKind == ckOneLine)
    {
    lpCurrent += 2;
    lpStart = lpCurrent;
    CommentKind = ckNull;
    };
    };
    if (CommentKind == ckNull)//
    {
          if (*lpCurrent == '/')
          {
    if (*(lpCurrent + 1) == '*')
    {
    FindToken(yystype);
          CommentKind = ckCpp;
        lpCurrent += 2;
    lpStart = lpCurrent;
    if (yystype->tokenval != 0)
    return;
    }else if (*(lpCurrent + 1) == '/')
    {
    FindToken(yystype);
          CommentKind = ckOneLine;
        lpCurrent += 2;
    lpStart = lpCurrent;
    if (yystype->tokenval != 0)
    return;
    }
          };
    if (*lpCurrent == '"') //"&Euml;&laquo;&Ograve;&yacute;&ordm;&Aring;
    {
            if (SymbolType == stString)
            {
              SymbolType = stBlank;
    lpCurrent++;
              TokenFlag = true;
            }
    else
              SymbolType = stString;
    }else if (*lpCurrent == 39) //'&micro;&yen;&Ograve;&yacute;&ordm;&Aring;
    {
            if (SymbolType == stChar)
            {
              SymbolType = stBlank;
    lpCurrent++;
              TokenFlag = true;
            }
    else
              SymbolType = stChar;
    }
    else if (SymbolType != stString && SymbolType != stChar) //&sup2;&raquo;&Ecirc;&Ccedil;×&Ouml;·&ucirc;&acute;&reg;
    {
    if (*lpCurrent <= 32 && *lpCurrent >= 1) //&Ecirc;&Ccedil;&iquest;&Otilde;&cedil;&ntilde;
    {
              if (SymbolType != stBlank)
              {
                TokenFlag = true;
              }else
              {
    lpStart = lpCurrent + 1;
    };
    SymbolType = stBlank;
            }
    else if ((*lpCurrent <= 'Z' && *lpCurrent >= 'A') //&Ecirc;&Ccedil;±ê&Ecirc;&frac34;·&ucirc;
      || (*lpCurrent <= 'z' && *lpCurrent >= 'a')
    || (*lpCurrent == '_'))
    {
              if (SymbolType != stID)
              {
                if (SymbolType != stNumber)
                {
                  SymbolType = stID;
                  TokenFlag = true;
                };
              };
            }
    else if (*lpCurrent <= '9' && *lpCurrent >= '0') //&Ecirc;&Ccedil;&Ecirc;&yacute;×&Ouml;
            {
              if (SymbolType != stNumber)
              {
                if (SymbolType != stID)
                {
                  SymbolType = stNumber;
                  TokenFlag = true;
                };
              };
            }
    else //&Ecirc;&Ccedil;·&ucirc;&ordm;&Aring;
    {
    SymbolType = stSign;
    if (!((*lpCurrent == '=' && 
      (*(lpCurrent - 1) == '<' || *(lpCurrent - 1) == '>' ||
    *(lpCurrent - 1) == '=' || *(lpCurrent - 1) == '!' ||
    *(lpCurrent - 1) == '*' || *(lpCurrent - 1) == '/' ||
    *(lpCurrent - 1) == '%' || *(lpCurrent - 1) == '+' ||
    *(lpCurrent - 1) == '-' || *(lpCurrent - 1) == '&' ||
    *(lpCurrent - 1) == '^' || *(lpCurrent - 1) == '|' )) ||
    (*(lpCurrent - 1) == '-' && *lpCurrent == '>') ||
    (*(lpCurrent - 1) == '+' && *lpCurrent == '+') ||
    (*(lpCurrent - 1) == '-' && *lpCurrent == '-') ||
    (*(lpCurrent - 1) == '<' && *lpCurrent == '<') ||
    (*(lpCurrent - 1) == '>' && *lpCurrent == '>') ||
    (*(lpCurrent - 1) == '&' && *lpCurrent == '&') ||
    (*(lpCurrent - 1) == '|' && *lpCurrent == '|')))
    {
    TokenFlag = true;
    if (*lpCurrent == '.')
    {
    if(*lpStart <= '9' && *lpStart >= '0')
    {
    SymbolType = stNumber;
    TokenFlag = false;
    };
    };
    };
    };
    };
    if (TokenFlag && lpCurrent > lpStart)// && lpCurrent - lpBuffer > 1)
    {
    FindToken(yystype);
    return;
    }else TokenFlag = false;
    };
    lpCurrent++;
      };
    FindToken(yystype);
    }void CzybCompile::FindToken(LPYYSTYPE yystype)
    {
    if (lpStart == lpCurrent || CommentKind == ckOneLine || CommentKind == ckCpp)
    {
    yystype->tokenval = 0;
    }else
    {
    yystype->tokenval = _IDENTIFIER;
        tagKeyWordMap::iterator KeyMap_Iterator;
    tagStack stack;
    if (*lpStart == '"')
    {
    if (*(lpCurrent - 1) != '"')
    {
    GoToError();
    yystype->tokenval = 0;
    }else
    {
    stack.push(*(lpCurrent - 1));
    *(lpCurrent - 1) = 0;
    *(lpCurrent - 1) = stack.top();
    stack.pop();
    yystype->tokenval = _STRING_LITERAL;
    };
    }else if (*lpStart == 39)
    {
    if ((lpCurrent - lpStart) > 2 && *(lpCurrent - 1) != 39)
    {
    GoToError();
    yystype->tokenval = 0;
    }else 
    {
    stack.push(*(lpCurrent - 1));
    *(lpCurrent - 1) = 0;
    yystype->Type = CT_CHAR;
    yystype->TypeValue = int(*lpStart);
    *(lpCurrent - 1) = stack.top();
    stack.pop();
    yystype->tokenval = _CONSTANT;
    };
    }
    else if (*lpStart <= '9' && *lpStart >= '0')
    {
    stack.push(*lpCurrent);
    *lpCurrent = 0;
    if (strstr(lpStart, ".") != NULL)
    {
    yystype->Type = CT_FLOAT;
    yystype->TypeValue = atof(lpStart);
    }else 
    {
    yystype->Type = CT_INT;
    yystype->TypeValue = atoi(lpStart);
    };
    *lpCurrent = stack.top();
    stack.pop();
    yystype->tokenval = _CONSTANT;
    }
    else
    {
    stack.push(*lpCurrent);
    *lpCurrent = 0;
    if ((KeyMap_Iterator = m_KeyMap.find(lpStart)) != m_KeyMap.end())
    yystype->tokenval = (*KeyMap_Iterator).second;
    // else
    // {
    // yystype->Place = LookUp(yystype->idstring, ftnotdefine);
    // if(yystype->Place) yystype->tokenval = _TYPE_NAME;
    else memccpy(yystype->idstring, lpStart, 0, SYMBOLNAMESIZE);
    // }
    *lpCurrent = stack.top();
    stack.pop();
    };
    };
    lpStart = lpCurrent;
    }void CzybCompile::yyaction(int yyruleno)
    {
    int T;
    switch (yyruleno)
    {//primary_expression
    case 1:  //: IDENTIFIER
    //&micro;±&Euml;&Ntilde;&Euml;÷&micro;&frac12;&Ograve;&raquo;&cedil;&ouml;±ê&Ecirc;&para;·&ucirc;&Ecirc;±&pound;&not;&sup2;é&Otilde;&Ograve;±&frac34;&sup2;&atilde;&frac14;°&Ograve;&Ocirc;&Eacute;&Iuml;·&Ouml;&sup3;&Igrave;&ETH;ò
    (&yyval)->Place = LookUpWhenNotDefine((yyvsp - 0)->idstring);
    if((&yyval)->Place == 0)
    // SymbolTable[(&yyval)->Place].type = (yyvsp - 0)->Type;
    // else
    GoToError(); //&Egrave;&ccedil;&sup1;&ucirc;&Atilde;&raquo;&sup2;é&micro;&frac12;&pound;&not;&Igrave;á&Ecirc;&frac34;&sup3;&ouml;&acute;í
    break;
    case 2:  //| CONSTANT
    T = 0;
    // yyval = *(yyvsp - 0);
    break;
    case 3:  //| STRING_LITERAL
    T = 0;
    // yyval = *(yyvsp - 0);
    break;
    case 4:  //| '(' expression ')'
    T = 0;
    (&yyval)->Place = (yyvsp - 1)->Place;
    // yyval = *(yyvsp - 2);
    break;//postfix_expression
    case 5:  //: primary_expression
    // (&yyval)->DIM = 0;
    // (&yyval)->ArrSum = 0;
    // (&yyval)->Varpart = 0;
    T = 0;
    // yyval = *(yyvsp - 0);
    break;
    case 6:  //| array_expression
    /*(&yyval)->DIM++;
    if((yyvsp - 0)->Varpart > 0)
    {
    if((yyvsp - 0)->ArrSum > 0)
    {
    T = NewTemp(CT_INT);
    FillVarType(T, CT_INT);
    Trip('+', NULL, (yyvsp - 0)->Varpart, IS_CONSTANT, (yyvsp - 0)->ArrSum, GetArgType(T), SymbolTable[T].addr);
    (&yyval)->Varpart = T;
    }else (&yyval)->Varpart = (yyvsp - 0)->Varpart;
    T = NewTemp();
    if((yyvsp - 0)->Type == CT_CHAR)
    Trip(CHAR_TO_ADDR, CharArrayPoint, (&yyval)->Varpart, T);
    else if((yyvsp - 0)->Type == CT_INT)
    Trip(INT_TO_ADDR, IntArrayPoint, (&yyval)->Varpart, T);
    else if((yyvsp - 0)->Type == CT_FLOAT)
    Trip(FLOAT_TO_ADDR, FloatArrayPoint, (&yyval)->Varpart, T);
    (&yyval)->Place = T;
    }else
    {
    T = NewTemp();
    if(SymbolTable[(yyvsp - 0)->Place].type == CT_CHAR)
    Trip(CHAR_TO_ADDR + ARG2_ISCONSTANT, CharArrayPoint, (yyvsp - 0)->ArrSum, T);
    else if(SymbolTable[(yyvsp - 0)->Place].type == CT_INT)
    Trip(INT_TO_ADDR + ARG2_ISCONSTANT, IntArrayPoint, (yyvsp - 0)->ArrSum, T);
    else if(SymbolTable[(yyvsp - 0)->Place].type == CT_FLOAT)
    Trip(FLOAT_TO_ADDR + ARG2_ISCONSTANT, FloatArrayPoint, (yyvsp - 0)->ArrSum, T);
    (&yyval)->Place = T;
    }
    if(SymbolTable[(yyvsp - 0)->Place].type == CT_CHAR)
    {
    CharArrayPoint += SymbolTable[(yyvsp - 0)->Place].Vector[0];
    }else if(SymbolTable[(yyvsp - 0)->Place].type == CT_INT)
    {
    IntArrayPoint += SymbolTable[(yyvsp - 0)->Place].Vector[0];
    }else if(SymbolTable[(yyvsp - 0)->Place].type == CT_FLOAT)
    {
    FloatArrayPoint += SymbolTable[(yyvsp - 0)->Place].Vector[0];
    }*/
    T = 0;
    break;
    case 7:  //| postfix_expression '(' ')'
    // yyval = *(yyvsp - 2);
    T = 0;
    break;
    case 8:  //| postfix_expression '(' argument_expression_list ')'
    // yyval = *(yyvsp - 3);
    T = 0;
    break;
    case 9:  //| postfix_expression '.' IDENTIFIER
    // yyval = *(yyvsp - 2);
    T = 0;
    break;
    case 10: //| postfix_expression PTR_OP IDENTIFIER
    // yyval = *(yyvsp - 2);
    T = 0;
    break;
    case 11: //| postfix_expression INC_OP '++'
    if((yyvsp - 1)->tokenval != _CONSTANT)
    Trip((yyvsp - 0)->tokenval, GetArgType((&yyval)->Place), SymbolTable[(&yyval)->Place].addr, NULL, 0, GetArgType((&yyval)->Place), SymbolTable[(&yyval)->Place].addr);
    else GoToError();
    (&yyval)->Place = (yyvsp - 1)->Place;
    break;
    case 12: //| postfix_expression DEC_OP '--'
    if((yyvsp - 1)->tokenval != _CONSTANT)
    Trip((yyvsp - 0)->tokenval, GetArgType((&yyval)->Place), SymbolTable[(&yyval)->Place].addr, NULL, 0, GetArgType((&yyval)->Place), SymbolTable[(&yyval)->Place].addr);
    else GoToError();
    (&yyval)->Place = (yyvsp - 1)->Place;
    break;//argument_expression_list
    case 13: //: assignment_expression
    // yyval = *(yyvsp - 0);
    T = 0;
    break;
    case 14: //| argument_expression_list ',' assignment_expression/
    // yyval = *(yyvsp - 2);
    T = 0;
    break;//unary_expression
    case 15: //: postfix_expression
    T = 0;
    // yyval = *(yyvsp - 0);
    break;
    case 16: //| INC_OP unary_expression
    T = 0;
    // yyval = *(yyvsp - 1);
    break;
    case 17: //| DEC_OP unary_expression
    T = 0;
    // yyval = *(yyvsp - 1);
    break;
    case 18: //| unary_operator cast_expression
    T = 0;
    // yyval = *(yyvsp - 1);
    break;
    case 19: //| SIZEOF unary_expression
    T = 0;
    // yyval = *(yyvsp - 1);
    break;
    case 20: //| SIZEOF '(' type_name ')'
    T = 0;
    // yyval = *(yyvsp - 3);
    break;//unary_operator
    case 21: //: '&'
    T = 0;
    // yyval = *(yyvsp - 0);
    break;
    case 22: //| '*'
    T = 0;
    // yyval = *(yyvsp - 0);
    break;
    case 23: //| '+'
    T = 0;
    // yyval = *(yyvsp - 0);
    break;
    case 24: //| '-'
    T = 0;
    // yyval = *(yyvsp - 0);
    break;
    case 25: //| '~'
    T = 0;
    // yyval = *(yyvsp - 0);
    break;
    case 26: //| '!'
    T = 0;
    // yyval = *(yyvsp - 0);
    break;//cast_expression
    case 27: //: unary_expression
    T = 0;
    // yyval = *(yyvsp - 0);
    break;
    case 28: //| '(' type_name ')' cast_expression
    T = 0;
    //        yyval = *(yyvsp - 3);
    break;//multiplicative_expression
    case 29: //: cast_expression
    T = 0;
    // yyval = *(yyvsp - 0);
    break;
    case 30: //| multiplicative_expression '*' cast_expression
    (&yyval)->Place = SetOperation((yyvsp - 2), (yyvsp - 1), (yyvsp - 0));
    break;
    case 31: //| multiplicative_expression '/' cast_expression
    (&yyval)->Place = SetOperation((yyvsp - 2), (yyvsp - 1), (yyvsp - 0));
    break;
    case 32: //| multiplicative_expression '%' cast_expression
    (&yyval)->Place = SetOperation((yyvsp - 2), (yyvsp - 1), (yyvsp - 0));
    break;//additive_expression
    case 33: //: multiplicative_expression
    T = 0;
    // yyval = *(yyvsp - 0);
    break;
    case 34: //| additive_expression '+' multiplicative_expression
    (&yyval)->Place = SetOperation((yyvsp - 2), (yyvsp - 1), (yyvsp - 0));
    break;
    case 35: //| additive_expression '-' multiplicative_expression
    (&yyval)->Place = SetOperation((yyvsp - 2), (yyvsp - 1), (yyvsp - 0));
    break;//shift_expression
    case 36: //: additive_expression
    T = 0;
    // yyval = *(yyvsp - 0);
    break;
    case 37: //| shift_expression LEFT_OP additive_expression
    (&yyval)->Place = SetOperation((yyvsp - 2), (yyvsp - 1), (yyvsp - 0));
    break;
    case 38: //| shift_expression RIGHT_OP additive_expression
    (&yyval)->Place = SetOperation((yyvsp - 2), (yyvsp - 1), (yyvsp - 0));
    break;//relational_expression
    case 39: //: shift_expression
    T = 0;
    // yyval = *(yyvsp - 0);
    break;
    case 40: //| relational_expression '<' shift_expression
    (&yyval)->Place = SetOperation((yyvsp - 2), (yyvsp - 1), (yyvsp - 0));
    break;
    case 41: //| relational_expression '>' shift_expression
    (&yyval)->Place = SetOperation((yyvsp - 2), (yyvsp - 1), (yyvsp - 0));
    break;
    case 42: //| relational_expression LE_OP shift_expression   //<=
    (&yyval)->Place = SetOperation((yyvsp - 2), (yyvsp - 1), (yyvsp - 0));
    break;
    case 43: //| relational_expression GE_OP shift_expression   //>=
    (&yyval)->Place = SetOperation((yyvsp - 2), (yyvsp - 1), (yyvsp - 0));
    break;//equality_expression
    case 44: //: relational_expression
    T = 0;
    // yyval = *(yyvsp - 0);
    break;
    case 45: //| equality_expression EQ_OP relational_expression
    (&yyval)->Place = SetOperation((yyvsp - 2), (yyvsp - 1), (yyvsp - 0));
    break;
    case 46: //| equality_expression NE_OP relational_expression
    (&yyval)->Place = SetOperation((yyvsp - 2), (yyvsp - 1), (yyvsp - 0));
    break;//and_expression
    case 47: //: equality_expression
    T = 0;
    // yyval = *(yyvsp - 0);
    break;
    case 48: //| and_expression '&' equality_expression
    //&Ocirc;&Euml;&Euml;&atilde;·&ucirc; &
    (&yyval)->Place = SetOperation((yyvsp - 2), (yyvsp - 1), (yyvsp - 0));
    break;//exclusive_or_expression
    case 49: //: and_expression
    T = 0;
    // yyval = *(yyvsp - 0);
    break;
    case 50: //| exclusive_or_expression '^' and_expression
    //&Ocirc;&Euml;&Euml;&atilde;·&ucirc; ^
    (&yyval)->Place = SetOperation((yyvsp - 2), (yyvsp - 1), (yyvsp - 0));
    break;//inclusive_or_expression
    case 51: //: exclusive_or_expression
    T = 0;
    // yyval = *(yyvsp - 0);
    break;
    case 52: //| inclusive_or_expression '|' exclusive_or_expression
    //&Ocirc;&Euml;&Euml;&atilde;·&ucirc; |
    (&yyval)->Place = SetOperation((yyvsp - 2), (yyvsp - 1), (yyvsp - 0));
    break;//logical_and_expression
    case 53: //: inclusive_or_expression
    T = 0;
    // yyval = *(yyvsp - 0);
    break;
    case 54: //| logical_and_expression AND_OP inclusive_or_expression
    //&Ocirc;&Euml;&Euml;&atilde;·&ucirc; &&
    (&yyval)->Place = SetOperation((yyvsp - 2), (yyvsp - 1), (yyvsp - 0));
    break;//logical_or_expression
    case 55: //: logical_and_expression
    T = 0;
    // yyval = *(yyvsp - 0);
    break;
    case 56: //| logical_or_expression OR_OP logical_and_expression
    //&Ocirc;&Euml;&Euml;&atilde;·&ucirc; ||
    (&yyval)->Place = SetOperation((yyvsp - 2), (yyvsp - 1), (yyvsp - 0));
    break;//conditional_expression
    case 57: //: logical_or_expression
    T = 0;
    // yyval = *(yyvsp - 0);
    break;
    case 58: //| logical_or_expression '?' expression ':' conditional_expression
    T = 0;
    // yyval = *(yyvsp - 4);
    break;//assignment_expression
    case 59: //: conditional_expression
    T = 0;
    // yyval = *(yyvsp - 0);
    break;
    case 60: //| unary_expression assignment_operator assignment_expression
    if((yyvsp - 2)->tokenval != _CONSTANT)
    {
    if((yyvsp - 0)->tokenval == _CONSTANT)
    {
    Trip((yyvsp - 1)->tokenval, IS_CONSTANT, (yyvsp - 0)->TypeValue, NULL, 0, GetArgType((yyvsp - 2)->Place), SymbolTable[(yyvsp - 2)->Place].addr);
    }else Trip((yyvsp - 1)->tokenval, GetArgType((yyvsp - 0)->Place), SymbolTable[(yyvsp - 0)->Place].addr, NULL, 0, GetArgType((yyvsp - 2)->Place), SymbolTable[(yyvsp - 2)->Place].addr);
    (&yyval)->Type = (yyvsp - 0)->Type;
    }else GoToError();
    break;//assignment_operator
    case 61: //: '='
    T = 0;
    // yyval = *(yyvsp - 0);
    break;
    case 62: //| MUL_ASSIGN  *=
    T = 0;
    // yyval = *(yyvsp - 0);
    break;
    case 63: //| DIV_ASSIGN  /=
    T = 0;
    // yyval = *(yyvsp - 0);
    break;
    case 64: //| MOD_ASSIGN  %=
    T = 0;
    // yyval = *(yyvsp - 0);
    break;
    case 65: //| ADD_ASSIGN  +=
    T = 0;
    // yyval = *(yyvsp - 0);
    break;
    case 66: //| SUB_ASSIGN  -=
    T = 0;
    // yyval = *(yyvsp - 0);
    break;
    case 67: //| LEFT_ASSIGN <<=
    T = 0;
    // yyval = *(yyvsp - 0);
    break;
    case 68: //| RIGHT_ASSIGN >>=
    T = 0;
    // yyval = *(yyvsp - 0);
    break;
    case 69: //| AND_ASSIGN  &=
    T = 0;
    // yyval = *(yyvsp - 0);
    break;
    case 70: //| XOR_ASSIGN  ^=
    T = 0;
    // yyval = *(yyvsp - 0);
    break;
    case 71: //| OR_ASSIGN   |=
    T = 0;
    // yyval = *(yyvsp - 0);
    break;//expression
    case 72: //: assignment_expression
    T = 0;
    // yyval = *(yyvsp - 0);
    break;
    case 73: //| expression ',' assignment_expression
    T = 0;
    // yyval = *(yyvsp - 2);
    break;//constant_expression
    case 74: //: conditional_expression
    T = 0;
    // yyval = *(yyvsp - 0);
    break;//declaration
    case 75: //: declaration_specifiers ';'
    T = 0;
    // yyval = *(yyvsp - 1);
    break;
    case 76: //| def_init_declarator ';'
    //&frac14;ì&sup2;&acirc;&micro;&frac12;&Ograve;&raquo;&cedil;&ouml;&para;¨&Ograve;&aring;&ETH;&Ocirc;&sup3;&ouml;&Iuml;&Ouml;&micro;&Auml;±ê&Ecirc;&frac34;·&ucirc;

    // SetDeclaration((yyvsp - 1)->idstring, (yyvsp - 2)->Type);
    // yyval = *(yyvsp - 2);
    T = 0;
    break;//declaration_specifiers
    case 77: //: storage_class_specifier
    T = 0;
    // yyval = *(yyvsp - 0);
    break;
    case 78: //| storage_class_specifier declaration_specifiers
    if((yyvsp - 1)->tokenval == _TYPEDEF) (&yyval)->Type = CT_TYPEDEF + (yyvsp - 0)->Type;
    else (&yyval)->Type = (yyvsp - 0)->Type;
    // yyval = *(yyvsp - 1);
    break;
    case 79: //| type_specifier
    T = 0;
    (&yyval)->Type = (yyvsp - 0)->Type;
    // yyval = *(yyvsp - 0);
    break;
    case 80: //| type_specifier declaration_specifiers
    if((yyvsp - 1)->tokenval == _SIGNED)
    {
    if(yyvsp->Type >= CT_CHAR && yyvsp->Type <= CT_DOUBLE)
    {
    (yyvsp - 1)->Type = (yyvsp - 0)->Type;
    }else GoToError();
    }else if((yyvsp - 1)->tokenval == _UNSIGNED)
    {
    if(yyvsp->tokenval >= _CHAR && yyvsp->tokenval <= _LONG)
    {
    (yyvsp - 1)->Type = CT_UNSIGNED + (yyvsp - 0)->Type;
    }else GoToError();
    };
    // yyval = *(yyvsp - 1);
    break;
    case 81: //| type_qualifier
    T = 0;
    // yyval = *(yyvsp - 0);
    break;
    case 82: //| type_qualifier declaration_specifiers
    T = 0;
    // yyval = *(yyvsp - 1);
    break;//def_init_declarator
    case 83: //: declaration_specifiers init_declarator
    FillVarType((yyvsp - 0)->Place, (yyvsp - 1)->Type);
    if((yyvsp - 0)->Type / 10 == 1)
    {
    if(CanAddToTemp)
    TempQuadruple[QuadrupleIndex - 1].qResult = SymbolTable[(yyvsp - 0)->Place].addr;
    else QuadrupleList[NXQ - 1].qResult = SymbolTable[(yyvsp - 0)->Place].addr;
    }
    (&yyval)->Type = (yyvsp - 1)->Type;
    break; case 84: //| def_init_declarator ',' init_declarator
    FillVarType((yyvsp - 0)->Place, (yyvsp - 2)->Type);
    (&yyval)->Type = (yyvsp - 2)->Type;
    break;//init_declarator_list
    /* case 83: //: init_declarator
    T = 0;
    // yyval = *(yyvsp - 0);
    break;
    case 84: //| init_declarator_list ',' init_declarator
    AddIDToArray();
    T = 0;
    // yyval = *(yyvsp - 2);
    break;
    */
    //init_declarator
    case 85: //: declarator
    (&yyval)->Type = NULL;
    // yyval = *(yyvsp - 0);
    break;
    case 86: //| declarator '=' initializer
    if((yyvsp - 2)->tokenval != _CONSTANT)
    {
    if((yyvsp - 0)->tokenval == _CONSTANT)
    {
    Trip((yyvsp - 1)->tokenval, IS_CONSTANT, (yyvsp - 0)->TypeValue, NULL, 0, GetArgType((yyvsp - 2)->Place), SymbolTable[(yyvsp - 2)->Place].addr);
    }else Trip((yyvsp - 1)->tokenval, GetArgType((yyvsp - 0)->Place), SymbolTable[(yyvsp - 0)->Place].addr, NULL, 0, GetArgType((yyvsp - 2)->Place), SymbolTable[(yyvsp - 2)->Place].addr);
    (&yyval)->Type = (yyvsp - 0)->Type + CT_IDENT_INIT;
    }else GoToError();
    // (&yyval)->Type = (yyvsp - 0)->Type;
    // yyval = *(yyvsp - 2); break;//storage_class_specifier
    case 87: //: TYPEDEF
    T = 0;
    // yyval = *(yyvsp - 0);
    break;
    case 88: //| EXTERN
    T = 0;
    // yyval = *(yyvsp - 0);
    break;
    case 89: //| STATIC
    T = 0;
    // yyval = *(yyvsp - 0);
    break;
    case 90: //| AUTO
    T = 0;
    // yyval = *(yyvsp - 0);
    break;
    case 91: //| REGISTER
    T = 0;
    // yyval = *(yyvsp - 0);
    break;//type_specifier
    case 92: //: VOID
    T = 0;
    // yyval = *(yyvsp - 0);
    break;
    case 93: //| CHAR
    (&yyval)->Type = CT_CHAR;
    //yyval = *(yyvsp - 0);
    break;
    case 94: //| SHORT
    (&yyval)->Type = CT_SHORT;
    //yyval = *(yyvsp - 0);
    break;
    case 95: //| INT
    (&yyval)->Type = CT_INT;
    //yyval = *(yyvsp - 0);
    break;
    case 96: //| LONG
    (&yyval)->Type = CT_LONG;
    //yyval = *(yyvsp - 0);
    break;
    case 97: //| FLOAT
    (&yyval)->Type = CT_FLOAT;
    //yyval = *(yyvsp - 0);
    break;
    case 98: //| DOUBLE
    (&yyval)->Type = CT_DOUBLE;
    //yyval = *(yyvsp - 0);
    break;
    case 99: //| SIGNED
    T = 0;
    // yyval = *(yyvsp - 0);
    break;
    case 100: //| UNSIGNED
    T = 0;
    // yyval = *(yyvsp - 0);
    break;
    case 101: //| struct_or_union_specifier
    T = 0;
    // yyval = *(yyvsp - 0);
    break;
    case 102: //| enum_specifier
    T = 0;
    // yyval = *(yyvsp - 0);
    break;
    case 103: //| TYPE_NAME
    T = 0;
    // yyval = *(yyvsp - 0);
    break;//struct_or_union_specifier
    case 104: //: struct_or_union IDENTIFIER '{' struct_declaration_list '}'
    T = 0;
    // yyval = *(yyvsp - 4);
    break;
    case 105: //| struct_or_union '{' struct_declaration_list '}'
    T = 0;
    // yyval = *(yyvsp - 3);
    break;
    case 106: //| struct_or_union IDENTIFIER
    T = 0;
    // yyval = *(yyvsp - 1);
    break;//struct_or_union
    case 107: //: STRUCT
    T = 0;
    // yyval = *(yyvsp - 0);
    break;
    case 108: //| UNION
    T = 0;
    // yyval = *(yyvsp - 0);
    break;//struct_declaration_list
    case 109: //: struct_declaration
    T = 0;
    // yyval = *(yyvsp - 0);
    break;
    case 110: //| struct_declaration_list struct_declaration
    T = 0;
    // yyval = *(yyvsp - 1);
    break;//struct_declaration
    case 111: //: specifier_qualifier_list struct_declarator_list ';'
    T = 0;
    // yyval = *(yyvsp - 2);
    break;//specifier_qualifier_list
    case 112: //: type_specifier specifier_qualifier_list
    T = 0;
    // yyval = *(yyvsp - 1);
    break;
    case 113: //| type_specifier
    T = 0;
    // yyval = *(yyvsp - 0);
    break;
    case 114: //| type_qualifier specifier_qualifier_list
    T = 0;
    // yyval = *(yyvsp - 1);
    break;
    case 115: //| type_qualifier
    T = 0;
    // yyval = *(yyvsp - 0);
    break;//struct_declarator_list
    case 116: //: struct_declarator
    T = 0;
    // yyval = *(yyvsp - 0);
    break;
    case 117: //| struct_declarator_list ',' struct_declarator
    T = 0;
    // yyval = *(yyvsp - 2);
    break;//struct_declarator
    case 118: //: declarator
    T = 0;
    // yyval = *(yyvsp - 0);
    break;
    case 119: //| ':' constant_expression
    T = 0;
    // yyval = *(yyvsp - 1);
    break;
    case 120: //| declarator ':' constant_expression
    T = 0;
    // yyval = *(yyvsp - 2);
    break;//enum_specifier
    case 121: //: ENUM '{' enumerator_list '}'
    T = 0;
    // yyval = *(yyvsp - 3);
    break;
    case 122: //| ENUM IDENTIFIER '{' enumerator_list '}'
    T = 0;
    // yyval = *(yyvsp - 4);
    break;
    case 123: //| ENUM IDENTIFIER
    T = 0;
    // yyval = *(yyvsp - 1);
    break;//enumerator_list
    case 124: //: enumerator
    T = 0;
    // yyval = *(yyvsp - 0);
    break;
    case 125: //| enumerator_list ',' enumerator
    T = 0;
    // yyval = *(yyvsp - 2);
    break;//enumerator
    case 126: //: IDENTIFIER
    T = 0;
    // yyval = *(yyvsp - 0);
    break;
    case 127: //| IDENTIFIER '=' constant_expression
    T = 0;
    // yyval = *(yyvsp - 2);
    break;//type_qualifier
    case 128: //: CONST
    T = 0;
    // yyval = *(yyvsp - 0);
    break;
    case 129: //| VOLATILE
    T = 0;
    // yyval = *(yyvsp - 0);
    break;//declarator
    case 130: //: pointer direct_declarator
    memccpy((&yyval)->idstring, (yyvsp - 0)->idstring, 0, SYMBOLNAMESIZE);
    //yyval = *(yyvsp - 1);
    break;
    case 131: //| direct_declarator
    T = 0;
    // yyval = *(yyvsp - 0);
    break;//direct_declarator
    case 132: //: IDENTIFIER
    /*&micro;±&Eacute;¨&Ecirc;&Oacute;&micro;&frac12;&micro;±&Ccedil;°·&Ouml;&sup3;&Igrave;&ETH;ò&Ouml;&ETH;&Ograve;&raquo;&cedil;&ouml;&para;¨&Ograve;&aring;&ETH;&Ocirc;&sup3;&ouml;&Iuml;&Ouml;&micro;&Auml;±ê&Ecirc;&frac34;·&ucirc;&Ecirc;±&pound;&not;&frac12;&laquo;&cedil;&Atilde;&Atilde;&ucirc;×&Ouml;&frac14;°&AElig;&auml;&Oacute;&ETH;&sup1;&Oslash;&ETH;&Aring;&Iuml;&cent;&Igrave;&icirc;&Egrave;&euml;&Aacute;&Ugrave;&Ecirc;±&sup1;¤×÷&Otilde;&raquo;&micro;&Auml;&para;&yen;&sup2;&iquest;
    (&micro;±&Egrave;&raquo;&pound;&not;&Ocirc;&Uacute;&Igrave;&icirc;&Egrave;&euml;&Ouml;&reg;&Ccedil;°&pound;&not;&Oacute;&brvbar;&Ocirc;&Uacute;&Aacute;&Ugrave;&Ecirc;±&Otilde;&raquo;±&frac34;·&Ouml;&sup3;&Igrave;&ETH;ò&Ograve;&Ntilde;&micro;&Ccedil;&Egrave;&euml;&micro;&Auml;&Iuml;&icirc;&Ouml;&ETH;&frac14;ì&sup2;é&Ecirc;&Ccedil;·&ntilde;&Oacute;&ETH;&Oacute;&euml;&cedil;&Atilde;&Atilde;&ucirc;×&Ouml;&Iuml;à&Iacute;&not;&micro;&Auml;&Atilde;&ucirc;×&Ouml;)&pound;&not;&Egrave;&raquo;&ordm;ó&Ocirc;&Uacute;·&Ouml;
    &sup3;&Igrave;&ETH;ò±í&Ouml;&ETH;&pound;&not;°&Ntilde;&micro;±&Ccedil;°·&Ouml;&sup3;&Igrave;&ETH;ò&Iuml;à&Oacute;&brvbar;&micro;&Ccedil;&frac14;&Ccedil;&Iuml;&icirc;&micro;&Auml;ECOUNT&Oacute;ò&micro;&Auml;&Ouml;&micro;&frac14;&Oacute;&Ograve;&raquo;&pound;&not;&Ccedil;&Ograve;&Ecirc;&sup1;POINTER&Oacute;ò&Ouml;&cedil;&Iuml;ò&ETH;&Acirc;&micro;&Auml;&Otilde;&raquo;&para;&yen;*/
    if(!LookUpWhenDefine((yyvsp - 0)->idstring))
    {
    (&yyval)->Place = Enter((yyvsp - 0)->idstring);//&Igrave;í&frac14;&Oacute;±&auml;&Aacute;&iquest;&micro;&frac12;·&ucirc;&ordm;&Aring;±í&Ouml;&ETH;
     
    SymbolTable[(&yyval)->Place].cat = CT_SIMVAR;//&Ouml;&Ouml;&Ecirc;&ocirc;&Icirc;&ordf;&frac14;ò&micro;&yen;±&auml;&Aacute;&iquest;
    SymbolTable[(&yyval)->Place].def = TRUE;
    SymbolTable[(&yyval)->Place].addr = 0;
    SymbolTable[(&yyval)->Place].IsTemp = FALSE;
    } else GoToError();
    break;
    case 133: //| '(' declarator ')'
    T = 0;
    // yyval = *(yyvsp - 2);
    break;
    case 134: //| array_declarator
    SymbolTable[(yyvsp - 0)->Place].Vector[0] = Access_C((yyvsp - 0)->Place, 0);
    // ArrayTable[ArrayIndex] = (yyvsp - 0)->Place; 
    // ArrayIndex++; //(&yyval)->
    T = 0;
    break;
    case 135: //| direct_declarator '[' ']'
    T = 0;
    // yyval = *(yyvsp - 2);
    break;
    case 136: //| direct_declarator '(' parameter_type_list ')'
    T = 0;
    // yyval = *(yyvsp - 3);
    break;
    case 137: //| direct_declarator '(' identifier_list ')'
    T = 0;
    // yyval = *(yyvsp - 3);
    break;
    case 138: //| direct_declarator '(' ')'
    T = 0;
    // yyval = *(yyvsp - 2);
    break;//pointer
    case 139: //: '*'
    (&yyval)->Type = CT_POINTER;
    //yyval = *(yyvsp - 0);
    break;
    case 140: //| '*' type_qualifier_list
    T = 0;
    // yyval = *(yyvsp - 1);
    break;
    case 141: //| '*' pointer
    (&yyval)->Type = CT_POINTER + (yyvsp - 0)->Type;
    //yyval = *(yyvsp - 1);
    break;
    case 142: //| '*' type_qualifier_list pointer
    T = 0;
    // yyval = *(yyvsp - 2);
    break;//type_qualifier_list
    case 143: //: type_qualifier
    T = 0;
    // yyval = *(yyvsp - 0);
    break;
    case 144: //| type_qualifier_list type_qualifier
    T = 0;
    // yyval = *(yyvsp - 1);
    break;//parameter_type_list
    case 145: //: parameter_list
    T = 0;
    // yyval = *(yyvsp - 0);
    break;
    case 146: //| parameter_list ',' ELLIPSIS
    T = 0;
    // yyval = *(yyvsp - 2);
    break;//parameter_list
    case 147: //: parameter_declaration
    T = 0;
    // yyval = *(yyvsp - 0);
    break;
    case 148: //| parameter_list ',' parameter_declaration
    T = 0;
    // yyval = *(yyvsp - 2);
    break;//parameter_declaration
    case 149: //: declaration_specifiers declarator
    T = 0;
    // yyval = *(yyvsp - 1);
    break;
    case 150: //| declaration_specifiers abstract_declarator
    T = 0;
    // yyval = *(yyvsp - 1);
    break;
    case 151: //| declaration_specifiers
    T = 0;
    // yyval = *(yyvsp - 0);
    break;//identifier_list
    case 152: //: IDENTIFIER
    T = 0;
    // yyval = *(yyvsp - 0);
    break;
    case 153: //| identifier_list ',' IDENTIFIER
    T = 0;
    // yyval = *(yyvsp - 2);
    break;//type_name
    case 154: //: specifier_qualifier_list
    T = 0;
    // yyval = *(yyvsp - 0);
    break;
    case 155: //| specifier_qualifier_list abstract_declarator
    T = 0;
    // yyval = *(yyvsp - 1);
    break;//abstract_declarator
    case 156: //: pointer
    T = 0;
    // yyval = *(yyvsp - 0);
    break;
    case 157: //| direct_abstract_declarator
    T = 0;
    // yyval = *(yyvsp - 0);
    break;
    case 158: //| pointer direct_abstract_declarator
    T = 0;
    // yyval = *(yyvsp - 1);
    break;//direct_abstract_declarator
    case 159: //: '(' abstract_declarator ')'
    T = 0;
    // yyval = *(yyvsp - 2);
    break;
    case 160: //| '[' ']'
    T = 0;
    // yyval = *(yyvsp - 1);
    break;
    case 161: //| '[' constant_expression ']'
    T = 0;
    // yyval = *(yyvsp - 2);
    break;
    case 162: //| direct_abstract_declarator '[' ']'
    T = 0;
    // yyval = *(yyvsp - 2);
    break;
    case 163: //| direct_abstract_declarator '[' constant_expression ']'
    T = 0;
    // yyval = *(yyvsp - 3);
    break;
    case 164: //| '(' ')'
    T = 0;
    // yyval = *(yyvsp - 1);
    break;
    case 165: //| '(' parameter_type_list ')'
    T = 0;
    // yyval = *(yyvsp - 2);
    break;
    case 166: //| direct_abstract_declarator '(' ')'
    T = 0;
    // yyval = *(yyvsp - 2);
    break;
    case 167: //| direct_abstract_declarator '(' parameter_type_list ')'
    T = 0;
    // yyval = *(yyvsp - 3);
    break;//initializer
    case 168: //: assignment_expression
    T = 0;
    // yyval = *(yyvsp - 0);
    break;
    case 169: //| '{' initializer_list '}'
    T = 0;
    // yyval = *(yyvsp - 2);
    break;
    case 170: //| '{' initializer_list ',' '}'
    T = 0;
    // yyval = *(yyvsp - 3);
    break;//initializer_list
    case 171: //: initializer
    T = 0;
    // yyval = *(yyvsp - 0);
    break;
    case 172: //| initializer_list ',' initializer
    T = 0;
    // yyval = *(yyvsp - 2);
    break;//statement
    case 173: //: labeled_statement
    // ClearTemp();
    // yyval = *(yyvsp - 0);
    break;
    case 174: //| compound_statement
    // ClearTemp();
    // yyval = *(yyvsp - 0);
    break;
    case 175: //| expression_statement
    // ClearTemp();
    // yyval = *(yyvsp - 0);
    break;
    case 176: //| selection_statement
    // ClearTemp();
    // yyval = *(yyvsp - 0);
    break;
    case 177: //| iteration_statement
    // ClearTemp();
    // yyval = *(yyvsp - 0);
    break;
    case 178: //| jump_statement
    // ClearTemp();
    // yyval = *(yyvsp - 0);
    break;//labeled_def
    case 179: //IDENTIFIER ':'
    LabelDef((yyvsp - 1)->idstring);
    //yyval = *(yyvsp - 1);
    break;//labeled_statement
    case 180: //: labeled_def statement
    T = 0;
    // yyval = *(yyvsp - 1);
    break;
    case 181: //| case_constant statement
    T = 0;
    // yyval = *(yyvsp - 3);
    break;
    case 182: //| default_start statement
    T = 0;
    // yyval = *(yyvsp - 2);
    break;//compound_statement
    //&micro;±&Eacute;¨&Ecirc;&Oacute;&micro;&frac12;·&Ouml;&sup3;&Igrave;&ETH;ò&frac12;á&Ecirc;&oslash;·&ucirc;&Ecirc;±&pound;&not;&frac12;&laquo;&frac14;&Ccedil;&Egrave;&euml;&Aacute;&Ugrave;&Ecirc;±&sup1;¤×÷&Otilde;&raquo;&micro;&Auml;±&frac34;&sup2;&atilde;·&Ouml;&sup3;&Igrave;&ETH;ò&Egrave;&laquo;&sup2;&iquest;&micro;&Ccedil;&frac14;&Ccedil;&Iuml;&icirc;&Ograve;&AElig;&Ouml;&Aacute;&Otilde;&yacute;&Ecirc;&frac12;&micro;&Auml;·&ucirc;&ordm;&Aring;±í&Ouml;&ETH;&pound;&not;
    //&Ccedil;&Ograve;&ETH;&THORN;&cedil;&Auml;POINTER&micro;&Auml;&Auml;&Uacute;&Egrave;&Yacute;&pound;&not;&Ecirc;&sup1;&Ouml;&reg;&Ouml;&cedil;&Iuml;ò±&frac34;&sup2;&atilde;·&Ouml;&sup3;&Igrave;&ETH;ò&micro;&Auml;&Ouml;&icirc;&Atilde;&ucirc;×&Ouml;&micro;&Ccedil;&frac14;&Ccedil;&Iuml;&icirc;&Ocirc;&Uacute;·&ucirc;&ordm;&Aring;±í&Ouml;&ETH;&micro;&Auml;&AElig;&eth;&Ecirc;&frac14;&Icirc;&raquo;&Ouml;&Atilde;
    case 183: //: '{' '}'
    SetEndChar();
    T = 0;
    // yyval = *(yyvsp - 1);
    break;
    case 184: //| '{' statement_list '}'
    SetEndChar();
    T = 0;
    // yyval = *(yyvsp - 2);
    break;
      case 185: //| '{' declaration_list '}'
    SetEndChar();
    T = 0;
    // yyval = *(yyvsp - 2);
    break;
    case 186: //| '{' declaration_list statement_list '}'
    SetEndChar();
    T = 0;
    // yyval = *(yyvsp - 3);
    break;//declaration_list
    case 187: //: declaration
    T = 0;
    // yyval = *(yyvsp - 0);
    break;
    case 188: //| declaration_list declaration
    T = 0;
    // yyval = *(yyvsp - 1);
    break;//statement_list
    case 189: //: statement
    T = 0;
    // yyval = *(yyvsp - 0);
    break;
    case 190: //| statement_list statement
    T = 0;
    // yyval = *(yyvsp - 1);
    break;//expression_statement
    case 191: //: ';'
    T = 0;
    // yyval = *(yyvsp - 0);
    break;
    case 192: //| expression ';'
    T = 0;
    // yyval = *(yyvsp - 1);
    break;//condition
    case 193://: IF '(' expression ')'
    if((yyvsp - 1)->tokenval == _CONSTANT)
    {
    Trip(JZ, IS_CONSTANT, (yyvsp - 1)->TypeValue, NULL, 0, NULL, 0);
    } else Trip(JZ, GetArgType((yyvsp - 1)->Place), SymbolTable[(yyvsp - 1)->Place].addr, NULL, 0, NULL, 0);
    (&yyval)->Chain = NXQ - 1;
    break;//cond_st_else
    case 194://: condition statement ELSE
    BackPatch((yyvsp - 2)->Chain, NXQ);
    Trip(JMP, NULL, 0, NULL, 0, NULL, 0);
    (&yyval)->Chain = NXQ - 1;
    //yyval = *(yyvsp - 2);
    break;//selection_statement
    case 195://: condition statement
    BackPatch((yyvsp - 1)->Chain, NXQ);
    break;
    case 196://| cond_st_else statement
    BackPatch((yyvsp - 1)->Chain, NXQ);
    break;
    case 197://| switch_start statement
    T = 0;
    Trip(JMP, NULL, (yyvsp - 0)->Place, NULL, 0, NULL, 0);
    (yyvsp - 0)->Chain = NXQ - 1;
    BackPatch((yyvsp - 1)->Chain, NXQ);
    OutFromCaseQueue();
    BackPatch((yyvsp - 0)->Chain, NXQ);
    BackPatch(LoopTable[LoopIndex].lqBreak, NXQ);
    LoopIndex--;
    break;//while_start
    case 198://: WHILE
    (&yyval)->LoopStart = NXQ;
    LoopIndex++;
    LoopTable[LoopIndex].lqContinue = NXQ;
    LoopTable[LoopIndex].lqBreak = 0;
    break;//while_expression
    case 199://: while_start '(' expression ')'
    if((yyvsp - 1)->tokenval == _CONSTANT)
    Trip(JZ, IS_CONSTANT, (yyvsp - 1)->TypeValue, NULL, 0, NULL, 0);
    else
    Trip(JZ, GetArgType((yyvsp - 1)->Place), SymbolTable[(yyvsp - 1)->Place].addr, NULL, 0, NULL, 0);
    (&yyval)->Chain = NXQ - 1;
    //yyval = *(yyvsp - 3);
    break;//do_start
    case 200://: DO
    (&yyval)->LoopStart = NXQ;
    LoopIndex++;
    LoopTable[LoopIndex].lqContinue = NXQ;
    LoopTable[LoopIndex].lqBreak = 0;
    break;//do_statement
    case 201://: do_start statement
    T = 0;
    // yyval = *(yyvsp - 1);
    break;//forloop1
    case 202://: FOR '(' expression_statement
    Trip(JMP, NULL, 0, NULL, 0, NULL, 0);
    (&yyval)->Chain = NXQ - 1;
    (&yyval)->LoopStart = NXQ;
    CanAddToTemp = TRUE;
    LoopIndex++;
    LoopTable[LoopIndex].lqContinue = NXQ - 1;
    LoopTable[LoopIndex].lqBreak = 0;
    break;//forloop2
    case 203://: forloop1_expression ')'
    OutFormTempQuadruple();
    BackPatch((yyvsp - 1)->Chain, NXQ - 1);
    (&yyval)->Chain = NXQ - 1;
    //yyval = *(yyvsp - 1);
    break;
    case 204://| forloop1_expression expression ')'
    OutFormTempQuadruple();
    BackPatch((yyvsp - 2)->Chain, NXQ - 1);
    (&yyval)->Chain = NXQ - 1;
    //yyval = *(yyvsp - 2);
    break;//iteration_statement
    case 205://: while_expression statement
    Trip(JMP, NULL, 0, NULL, 0, NULL, (yyvsp - 1)->LoopStart);
    BackPatch((yyvsp - 1)->Chain, NXQ);
    BackPatch(LoopTable[LoopIndex].lqBreak, NXQ);
    LoopIndex--;
    break;
    case 206://| do_statement WHILE '(' expression ')' ';'
    if((yyvsp - 2)->tokenval == _CONSTANT)
    {
    Trip(JNZ, IS_CONSTANT, (yyvsp - 2)->TypeValue, NULL, 0, NULL, (yyvsp - 5)->LoopStart);
    } else Trip(JNZ, GetArgType((yyvsp - 2)->Place), SymbolTable[(yyvsp - 2)->Place].addr, NULL, 0, NULL, (yyvsp - 5)->LoopStart);
    BackPatch(LoopTable[LoopIndex].lqBreak, NXQ);
    LoopIndex--;
    break;
    case 207://| forloop2 statement
    // BackPatch((yyvsp - 1)->LoopStart, NXQ);
    Trip(JMP, NULL, 0, NULL, 0, NULL, (yyvsp - 1)->LoopStart);
    BackPatch((yyvsp - 1)->Chain, NXQ);
    BackPatch(LoopTable[LoopIndex].lqBreak, NXQ);
    LoopIndex--;
    //yyval = *(yyvsp - 1);
    break;//jump_statement
    case 208: //: GOTO IDENTIFIER ';'
    GotoLabel((yyvsp - 1)->idstring);
    //yyval = *(yyvsp - 2);
    break;
    case 209: //| CONTINUE ';'
    T = 0;
    if(LoopTable[LoopIndex].lqContinue == -1)
    GoToError();
    else Trip(JMP, NULL, 0, NULL, 0, NULL, LoopTable[LoopIndex].lqContinue);
    break;
    case 210: //| BREAK ';'
    if(LoopTable[LoopIndex].lqBreak == -1)
    GoToError();
    else
    {
    Trip(JMP, NULL, 0, NULL, 0, NULL, LoopTable[LoopIndex].lqBreak);
    LoopTable[LoopIndex].lqBreak = NXQ - 1;
    }
    break;
    case 211: //| RETURN ';'
    T = 0;
    // yyval = *(yyvsp - 1);
    break;
    case 212: //| RETURN expression ';'
    T = 0;
    // yyval = *(yyvsp - 2);
    break;//translation_unit
    case 213: //: external_declaration
    T = 0;
    // yyval = *(yyvsp - 0);
    break;
    case 214: //| translation_unit external_declaration
    T = 0;
    // yyval = *(yyvsp - 1);
    break;//external_declaration
    case 215: //: function_definition
    T = 0;
    // yyval = *(yyvsp - 0);
    break;
    case 216: //| declaration
    T = 0;
    // yyval = *(yyvsp - 0);
    break;//function_definition
    case 217: //: declaration_specifiers declarator declaration_list compound_statement
    T = 0;
    // yyval = *(yyvsp - 3);
    break;
    case 218: //| declaration_specifiers declarator compound_statement
    T = 0;
    // yyval = *(yyvsp - 2);
    break;
    case 219: //| declarator declaration_list compound_statement
    T = 0;
    // yyval = *(yyvsp - 2);
    break;
    case 220: //| declarator compound_statement
    T = 0;
    // yyval = *(yyvsp - 1);
    break;//forloop1_expression
    case 221://forloop1 expression_statement 
    if((yyvsp - 2)->tokenval == _CONSTANT)
    {
    Trip(JZ, IS_CONSTANT, (yyvsp - 0)->TypeValue, NULL, 0, NULL, 0);
    } else Trip(JZ, GetArgType((yyvsp - 0)->Place), SymbolTable[(yyvsp - 2)->Place].addr, NULL, 0, NULL, 0);
    CanAddToTemp = FALSE;
    (&yyval)->Chain = NXQ - 1;
    //yyval = *(yyvsp - 1);
    break;
    // switch_start
    case 222://: SWITCH '(' expression ')'
    CaseIndex++;
    CaseIndexTable[CaseIndex].ciTempExp = NewTemp(SymbolTable[(yyvsp - 1)->Place].type);
    FillVarType(CaseIndexTable[CaseIndex].ciTempExp, SymbolTable[(yyvsp - 1)->Place].type);
    CaseIndexTable[CaseIndex].ciQueueIndex = QueueIndex;
    CaseIndexTable[CaseIndex].ciDefaultAddr = -1;
    if((yyvsp - 1)->tokenval == _CONSTANT)
    {
    Trip('=', 
    IS_CONSTANT, 
    (yyvsp - 1)->TypeValue, 
    NULL, 
    0, 
    GetArgType(CaseIndexTable[CaseIndex].ciTempExp), 
    SymbolTable[CaseIndexTable[CaseIndex].ciTempExp].addr);
    } else Trip('=', 
    GetArgType((yyvsp - 1)->Place), 
    SymbolTable[(yyvsp - 1)->Place].addr, 
    NULL, 
    0, 
    GetArgType(CaseIndexTable[CaseIndex].ciTempExp), 
    SymbolTable[CaseIndexTable[CaseIndex].ciTempExp].addr);
    Trip(JMP, NULL, 0, NULL, 0, NULL, 0);
    (&yyval)->Chain = NXQ - 1;
    LoopIndex++;
    LoopTable[LoopIndex].lqContinue = -1;
    LoopTable[LoopIndex].lqBreak = 0;
    break;// case_start
    case 223://: CASE
    T = 0;
    break;// case_constant
    case 224://: case_start constant_expression ':'
    if((yyvsp - 1)->tokenval == _CONSTANT)
    AddToCaseQueue(_CASE, (yyvsp - 1)->TypeValue, NXQ);
    else GoToError();
    break;//  default_start
      case 225:// DEFAULT ':'
    if(CaseIndexTable[CaseIndex].ciDefaultAddr < 0)
    {
    CaseIndexTable[CaseIndex].ciDefaultAddr = NXQ;
    // AddToCaseQueue(_DEFAULT, 0, NXQ);
    }
    else GoToError();
    break;
    // array_expression
    case 226://: postfix_expression '[' expression ']'
    /*&Ecirc;&yacute;×é&sup2;é&Otilde;&Ograve;*/
    (&yyval)->DIM = 0;
    (&yyval)->ArrSum = 0;
    (&yyval)->Varpart = 0;
    case 227://| array_expression '[' expression ']'
    /*&Ecirc;&yacute;×é&sup2;é&Otilde;&Ograve;*/
    (&yyval)->DIM++;
    if((&yyval)->DIM <= SymbolTable[(yyvsp - 3)->Place].Vector[1])
    {
    if((yyvsp - 1)->tokenval == _CONSTANT)
    {
    if(((yyvsp - 1)->Type == CT_INT) || ((yyvsp - 1)->Type == CT_CHAR))
    {
    if((yyvsp - 1)->TypeValue >= 0 && (yyvsp - 1)->TypeValue <= Access_d((yyvsp - 3)->Place, (&yyval)->DIM + 1) - 1)
    (&yyval)->ArrSum += Access_C((yyvsp - 3)->Place, (&yyval)->DIM) * (int)(yyvsp - 1)->TypeValue;
    else GoToError();
    }else GoToError();
    }else
    {
    int k = Access_C((yyvsp - 3)->Place, (&yyval)->DIM);
    if(k > 1)
    {
    T = NewTemp(CT_INT);
    Trip('*', IS_CONSTANT, k, GetArgType((yyvsp - 1)->Place), (yyvsp - 1)->Place, GetArgType(T), SymbolTable[T].addr);
    if((&yyval)->Varpart > 0)
    Trip('+', IS_CONSTANT, (yyvsp - 3)->Varpart, GetArgType(T), SymbolTable[T].addr, GetArgType(T), SymbolTable[T].addr);
    }else
    {
    if((&yyval)->Varpart > 0)
    {
    T = NewTemp(CT_INT);
    Trip('+', IS_CONSTANT, (yyvsp - 3)->Varpart, NULL, GetArgType((yyvsp - 1)->Place), GetArgType(T), SymbolTable[T].addr);
    }
    }
    (&yyval)->Varpart = T;
    }
    }else GoToError();
    break;
    // array_declarator
    case 228://: direct_declarator '[' constant_expression ']'
    SymbolTable[(yyvsp - 3)->Place].cat = CT_ARRAY;
    // SymbolTable[(yyvsp - 3)->Place].Vector = 0;
    SymbolTable[(yyvsp - 3)->Place].Vector = (int*)malloc(10 * sizeof(int));
    // SymbolTable[(yyvsp - 3)->Place].Vector[0] = ArrayIndex;
    SymbolTable[(yyvsp - 3)->Place].Vector[1] = 0; case 229://| array_declarator '[' constant_expression ']'
    SymbolTable[(yyvsp - 3)->Place].Vector[1]++;//&Icirc;&not;&Ecirc;&yacute;&frac14;&Oacute;&Ograve;&raquo;
    SymbolTable[(yyvsp - 3)->Place].Vector[SymbolTable[(yyvsp - 3)->Place].Vector[1] + 1] = (int)(yyvsp - 1)->TypeValue;//&Iuml;&Acirc;&frac12;&ccedil;
    break;
    }
    }
    void CzybCompile::GetSourceStr(const char* lp)
    {
      m_SourceStr = CString(lp);
    }int CzybCompile::Compile()
    {
      iStrLength = m_SourceStr.GetLength();
      lpBuffer = m_SourceStr.GetBuffer(iStrLength);
      lpStart = lpCurrent = lpBuffer;
    CommentKind = ckNull;
    SymbolType = stBlank;
    iLineIndex = iCharIndex = 0;
    SymbolInitialize();
    YaccInitialize();
    NXQ = 1;
      yyparse();
    return 0;
    }void CzybCompile::GoToError()
    {}void CzybCompile::GoToWarning()
    {}void CzybCompile::SymbolInitialize()
    {
    CURRBL = 0;
    LASTBL = 0;
    LASENT = 0;
    TOPENT = SYMBOLTABLESIZE;
    for(int i = 0; i < PROGRAMTABLESIZE; i++)
    {
    ProgramTable[i].ecount = 0;
    ProgramTable[i].outern = 0;
    ProgramTable[i].pointer = 0;
    }
    for(i = 0; i < SYMBOLTABLESIZE; i++)
    {
    SymbolTable[i].addr = 0;
    SymbolTable[i].Vector = 0;
    SymbolTable[i].cat = CT_SIMVAR;
    SymbolTable[i].def = FALSE;
    strcpy(SymbolTable[i].name, "");
    }
    for(i = 0; i < YYSTACKSIZE; i++)
    yyvs[i].DIM = 0;
    }void CzybCompile::YaccInitialize()
    {
    QuadrupleIndex = 0;
    CanAddToTemp = FALSE;
    CaseIndex = -1;
    QueueIndex = 0;
    LoopIndex = 0;
    LoopTable[0].lqContinue = -1;
    LoopTable[0].lqBreak = -1;
    ArrCharPoint = 0;
    ArrIntPoint = 0;
    ArrFloatPoint = 0;
    TempCharPoint = 0;
    TempIntPoint = 0;
    TempFloatPoint = 0;
    }void CzybCompile::SetEndChar()
    {
    /*&micro;±&Eacute;¨&Ecirc;&Oacute;&micro;&frac12;·&Ouml;&sup3;&Igrave;&ETH;ò&frac12;á&Ecirc;&oslash;·&ucirc;&Ecirc;±&pound;&not;&frac12;&laquo;&frac14;&Ccedil;&Egrave;&euml;&Aacute;&Ugrave;&Ecirc;±&sup1;¤×÷&Otilde;&raquo;&micro;&Auml;±&frac34;&sup2;&atilde;·&Ouml;&sup3;&Igrave;&ETH;ò&Egrave;&laquo;&sup2;&iquest;&micro;&Ccedil;&frac14;&Ccedil;&Iuml;&icirc;&Ograve;&AElig;&Ouml;&Aacute;&Otilde;&yacute;&Ecirc;&frac12;&micro;&Auml;·&ucirc;&ordm;&Aring;±í&Ouml;&ETH;&pound;&not;
    &Ccedil;&Ograve;&ETH;&THORN;&cedil;&Auml;POINTER&micro;&Auml;&Auml;&Uacute;&Egrave;&Yacute;&pound;&not;&Ecirc;&sup1;&Ouml;&reg;&Ouml;&cedil;&Iuml;ò±&frac34;&sup2;&atilde;·&Ouml;&sup3;&Igrave;&ETH;ò&micro;&Auml;&Ouml;&icirc;&Atilde;&ucirc;×&Ouml;&micro;&Ccedil;&frac14;&Ccedil;&Iuml;&icirc;&Ocirc;&Uacute;·&ucirc;&ordm;&Aring;±í&Ouml;&ETH;&micro;&Auml;&AElig;&eth;&Ecirc;&frac14;&Icirc;&raquo;&Ouml;&Atilde;,&Aacute;í&Iacute;&acirc;&pound;&not;&Ocirc;&Uacute;
    &Iacute;&Euml;&sup3;&ouml;&Ograve;&raquo;&sup2;&atilde;·&Ouml;&sup3;&Igrave;&ETH;ò&Ecirc;±&pound;&not;&raquo;&sup1;&Oacute;&brvbar;&Ecirc;&sup1;&Euml;&ucirc;&micro;&Auml;&Ouml;±&frac12;&Oacute;&Iacute;&acirc;&sup2;&atilde;·&Ouml;&sup3;&Igrave;&ETH;ò&sup3;&Eacute;&Icirc;&ordf;&micro;±&Ccedil;°&micro;&Auml;·&Ouml;&sup3;&Igrave;&ETH;ò*/
    ProgramTable[CURRBL].pointer = LASENT + 1;
    for(int i = 1; i <= ProgramTable[CURRBL].ecount; i++)
    {
    ++LASENT;
    SymbolTable[LASENT] = SymbolTable[TOPENT];
    TOPENT++;
    }
    CURRBL = ProgramTable[CURRBL].outern;
    }void CzybCompile::SetStartChar()
    {
    /*&Atilde;&iquest;&micro;±&frac12;&oslash;&Egrave;&euml;·&Ouml;&sup3;&Igrave;&ETH;ò&micro;&Auml;&Ecirc;×·&ucirc;&ordm;&Aring;&raquo;ò&sup1;&yacute;&sup3;&Igrave;(&ordm;&macr;&Ecirc;&yacute;)&Ecirc;±&pound;&not;&frac34;&Iacute;&Ocirc;&Uacute;·&Ouml;&sup3;&Igrave;&ETH;ò±í&Ouml;&ETH;&micro;&Ccedil;&frac14;&Ccedil;&Ograve;&raquo;&Iuml;&icirc;&pound;&not;&sup2;&cent;&Ecirc;&sup1;&Ouml;&reg;&sup3;&Eacute;&Icirc;&ordf;&micro;±&Ccedil;°&micro;&Auml;·&Ouml;&sup3;&Igrave;&ETH;ò*/
    LASTBL++; //&Ograve;&Ntilde;&acute;&brvbar;&Agrave;í&Iacute;ê&micro;&Auml;×&icirc;&cedil;&szlig;&sup2;&atilde;·&Ouml;&sup3;&Igrave;&ETH;ò&micro;&Auml;±à&ordm;&Aring;&frac14;&Oacute;&Ograve;&raquo;
    ProgramTable[LASTBL].outern = CURRBL; //&micro;±&Ccedil;°&Otilde;&yacute;&acute;&brvbar;&Agrave;í&micro;&Auml;·&Ouml;&sup3;&Igrave;&ETH;ò&micro;&Auml;±à&ordm;&Aring;
    ProgramTable[LASTBL].ecount = 0; //&micro;±&Ccedil;°&Otilde;&yacute;&acute;&brvbar;&Agrave;í&micro;&Auml;·&Ouml;&sup3;&Igrave;&ETH;ò&micro;&Auml;·&ucirc;&ordm;&Aring;±í
    ProgramTable[LASTBL].pointer = TOPENT;//&Aacute;&Ugrave;&Ecirc;±&sup1;¤×÷&Otilde;&raquo;&micro;&Auml;&Otilde;&raquo;&para;&yen;
    CURRBL = LASTBL;
    }int CzybCompile::LookUpWhenDefine(char *Name)
    {
    for(int i = ProgramTable[CURRBL].pointer; i < ProgramTable[CURRBL].pointer + ProgramTable[CURRBL].ecount; i++)
    if(strcmp(SymbolTable[i].name, Name) == 0 && SymbolTable[i].cat != CT_LAB) return i;
    return 0;
    }int CzybCompile::LookUpWhenNotDefine(char *Name)
    {
    for(int i = TOPENT; i < SYMBOLTABLESIZE; i++)
    if(strcmp(SymbolTable[i].name, Name) == 0 && SymbolTable[i].cat != CT_LAB) return i;
    return 0;
    }int CzybCompile::Enter(char *Name)
    {
    /*&Ocirc;&Uacute;·&ucirc;&ordm;&Aring;±í&micro;&Auml;&Atilde;&ucirc;×&Ouml;&Oacute;ò&Agrave;&iuml;&Igrave;&icirc;&Egrave;&euml;±ê&Ecirc;&frac34;·&ucirc;&micro;&Auml;&Atilde;&ucirc;×&Ouml;*/
    memccpy(SymbolTable[--TOPENT].name, Name, 0, SYMBOLNAMESIZE);
    /*±&frac34;&sup2;&atilde;·&Ouml;&sup3;&Igrave;&ETH;ò&micro;&Auml;±ê&Ecirc;&para;·&ucirc;&cedil;&ouml;&Ecirc;&yacute;&frac14;&Oacute;&Ograve;&raquo;*/
    ProgramTable[CURRBL].ecount++;
    /*±&frac34;&sup2;&atilde;·&Ouml;&sup3;&Igrave;&ETH;ò&micro;&Auml;&Ouml;&cedil;&Otilde;&euml;&Ouml;&cedil;&Iuml;òTOPENT*/
    ProgramTable[CURRBL].pointer = TOPENT;
    return TOPENT;
    }int CzybCompile::Entry(char *Name)
    {
    //&micro;±&Euml;&Ntilde;&Euml;÷&micro;&frac12;&Ograve;&raquo;&cedil;&ouml;±ê&Ecirc;&para;·&ucirc;&Ecirc;±&pound;&not;&sup2;é&Otilde;&Ograve;±&frac34;&sup2;&atilde;&frac14;°&Ograve;&Ocirc;&Eacute;&Iuml;·&Ouml;&sup3;&Igrave;&ETH;ò
    // int i = LookUp((yyvsp - 0)->idstring, ftndefine);
    // if(i) return i;
    // else return Enter(Name);
    return 0;
    }int CzybCompile::Trip(int op, int arg1type, float arg1, int arg2type, float arg2, int resulttype, int result)
    {
    if(CanAddToTemp)
    {
    TempQuadruple[QuadrupleIndex].qOperate = op;
    TempQuadruple[QuadrupleIndex].qArg1Type = arg1type;
    TempQuadruple[QuadrupleIndex].qArg1 = arg1;
    TempQuadruple[QuadrupleIndex].qArg2Type = arg2type;
    TempQuadruple[QuadrupleIndex].qArg2 = arg2;
    TempQuadruple[QuadrupleIndex].qResultType = resulttype;
    TempQuadruple[QuadrupleIndex].qResult = result;
    QuadrupleIndex++;
    }else 
    {
    QuadrupleList[NXQ].qOperate = op;
    QuadrupleList[NXQ].qArg1Type = arg1type;
    QuadrupleList[NXQ].qArg1 = arg1;
    QuadrupleList[NXQ].qArg2Type = arg2type;
    QuadrupleList[NXQ].qArg2 = arg2;
    QuadrupleList[NXQ].qResultType = resulttype;
    QuadrupleList[NXQ].qResult = result;
    NXQ++;
    }
    return NXQ - 1;
    }int CzybCompile::NewTemp(int Type)
    {
    int i = Enter("");
    SymbolTable[i].IsTemp = TRUE;
    SymbolTable[i].type = Type;
    return i;
    }int CzybCompile::Merge(int p1, int p2)
    {
    int p;
    if(!p2)return p1;/*p2==0&frac14;&acute;&micro;&Uacute;&para;&thorn;&Igrave;&otilde;&Aacute;&acute;&Icirc;&ordf;&iquest;&Otilde;*/
    else
    {
    p = p2;
    while(QuadrupleList[p].qResult)
    p = QuadrupleList[p].qResult;
    QuadrupleList[p].qResult = p1;
    return p2;
    }
    }void CzybCompile::BackPatch(int p, int t)
    {
    while(p > 0)
    {
    int q1 = QuadrupleList[p].qResult;
    QuadrupleList[p].qResult = t;
    p = q1;
    }
    return;
    }int CzybCompile::FindLabel(char* Name)
    {
    for(int i = TOPENT; i < SYMBOLTABLESIZE; i++)
    if(strcmp(SymbolTable[i].name, Name) == 0 && SymbolTable[i].cat == CT_LAB) return i;
    return 0;
    }void CzybCompile::GotoLabel(char *Name)
    {
    int i = FindLabel(Name);
    if (i == 0)
    {
    /*±ê&ordm;&Aring;&Ecirc;&Ccedil;·&ntilde;&Ecirc;×&acute;&Icirc;&sup3;&ouml;&Iuml;&Ouml;*/
    i = Enter(Name);
    SymbolTable[i].cat = CT_LAB;
    SymbolTable[i].def = FALSE;
    SymbolTable[i].addr = NXQ;
    Trip(JMP, NULL, 0, NULL, 0, NULL, 0);
    }else /*&cedil;&Atilde;±ê&ordm;&Aring;&Ograve;&Ntilde;&sup3;&ouml;&Iuml;&Ouml;&sup1;&yacute;*/
    if(SymbolTable[i].def) Trip(JMP, NULL, 0, NULL, 0, NULL, SymbolTable[i].addr);
    else
    {
    int n = NXQ;
    /*&cedil;&Atilde;±ê&ordm;&Aring;&Eacute;&ETH;&Icirc;&acute;&para;¨&Ograve;&aring;&pound;&not;&ETH;è&Oacute;&Atilde;&micro;&Oslash;&Ouml;·&Oacute;ò&Agrave;&acute;&Agrave;&shy;&Aacute;·*/
    Trip(JMP, NULL, 0, NULL, 0, NULL, SymbolTable[i].addr);
    SymbolTable[i].addr = n;
    }
    }void CzybCompile::LabelDef(char *Name)
    {
    int i = FindLabel(Name);
    if(i == 0)
    {//±ê&ordm;&Aring;&Ecirc;&Ccedil;&Ecirc;×&acute;&Icirc;&sup3;&ouml;&Iuml;&Ouml;
    i = Enter(Name);
    SymbolTable[i].cat = CT_LAB;
    SymbolTable[i].def = 1;
    SymbolTable[i].addr = NXQ;
    }else if(SymbolTable[i].def)
    {//&cedil;&Atilde;±ê&ordm;&Aring;&Ograve;&Ntilde;&frac34;&shy;&sup3;&ouml;&Iuml;&Ouml;&sup1;&yacute;
    GoToError();
    }else
    {
    SymbolTable[i].def = 1;
    BackPatch(SymbolTable[i].addr, NXQ);
    SymbolTable[i].addr = NXQ;
    }
    }void CzybCompile::OutFormTempQuadruple()
    {
    for(int i = 0; i <= QuadrupleIndex - 1; i++, NXQ++)
    {
    QuadrupleList[NXQ] = TempQuadruple[i];
    }
    QuadrupleIndex = 0;
    }int CzybCompile::AddToCaseQueue(int Token, float Ci, int Pi)
    {
    CaseQueueTable[QueueIndex].qOperate = Token;
    CaseQueueTable[QueueIndex].qArg1Type = NULL;
    CaseQueueTable[QueueIndex].qArg1 = Ci;
    CaseQueueTable[QueueIndex].qArg2Type = NULL;
    CaseQueueTable[QueueIndex].qArg2 = 0;
    CaseQueueTable[QueueIndex].qResult = Pi;
    QueueIndex++;
    return QueueIndex;
    }void CzybCompile::OutFromCaseQueue()
    {
    for(int i = CaseIndexTable[CaseIndex].ciQueueIndex; i <= QueueIndex - 1; i++)
    {
    int T = NewTemp(CT_CHAR);
    Trip(_EQ_OP, CaseQueueTable[i].qArg1Type, CaseQueueTable[i].qArg1, SymbolTable[CaseIndexTable[CaseIndex].ciTempExp].addr, CaseQueueTable[i].qArg1Type, GetArgType(T), SymbolTable[T].addr);
    Trip(JZ, GetArgType(T), SymbolTable[T].addr, NULL, 0, NULL, CaseQueueTable[i].qResult);
    }
    if(CaseIndexTable[CaseIndex].ciDefaultAddr >= 0)
    Trip(JMP, NULL, 0, NULL, 0, NULL, CaseIndexTable[CaseIndex].ciDefaultAddr);
    QueueIndex = CaseIndexTable[CaseIndex].ciQueueIndex;
    CaseIndex--;
    }int CzybCompile::AddLabDef(char *Name, int Addr)
    {
    return 0;
    }void CzybCompile::FillVarType(int VarNo, int VarType)
    {
    SymbolTable[VarNo].type = VarType;
    if(!SymbolTable[VarNo].IsTemp)
    {
    switch(VarType)
    {
    case CT_CHAR: SymbolTable[VarNo].addr = ArrCharPoint++;
    break;
    case CT_INT: SymbolTable[VarNo].addr = ArrIntPoint++;
    break;
    case CT_FLOAT:SymbolTable[VarNo].addr = ArrFloatPoint++;
    break;
    }
    }else
    {
    switch(VarType)
    {
    case CT_CHAR: SymbolTable[VarNo].addr = TempCharPoint++;
    break;
    case CT_INT: SymbolTable[VarNo].addr = TempIntPoint++;
    break;
    case CT_FLOAT:SymbolTable[VarNo].addr = TempFloatPoint++;
    break;
    }
    }
    }void CzybCompile::FillArrMSG_C(int VarNo)
    {}void CzybCompile::DualityExpr(YYSTYPE &Expr, int TokenVal, YYSTYPE *Expr1, YYSTYPE *Expr2)
    {
    /*if(Expr1->tokenval == _CONSTANT && Expr2->tokenval == _CONSTANT)
    {
    Expr.TypeValue = Expr1->TypeValue + Expr2->TypeValue;
    if(Expr1->Type == CT_FLOAT || Expr2->Type == CT_FLOAT)
    Expr.Type = CT_FLOAT;
    else Expr.Type = CT_INT;
    }
    else
    {
    Expr.Place = NewTemp();
    if(Expr1->tokenval == _CONSTANT)
    {
    Trip(TokenVal + ARG1_ISCONSTANT, Expr1->TypeValue, Expr2->Place, Expr.Place);
    }
    else if(Expr2->tokenval == _CONSTANT)
    {
    Trip(TokenVal + ARG2_ISCONSTANT, Expr1->Place, Expr2->TypeValue, Expr.Place);
    }else Trip(TokenVal, Expr1->Place, Expr2->Place, Expr.Place);
    }*/
    }
    int CzybCompile::Access_C(int No, int k)//&acute;&Oacute;·&ucirc;&ordm;&Aring;±í&micro;&Uacute;No&Iuml;&icirc;&micro;&Auml;Addr&Oacute;ò&Euml;ù&Ouml;&cedil;&Iuml;ò&Auml;&Uacute;&Ccedil;é&Iuml;ò&Aacute;&iquest;&Ouml;&ETH;&Egrave;&iexcl;C&Ouml;&micro;
    {
    int sum = 1;
    for(int i = k + 2; i < SymbolTable[No].Vector[1] + 2; i++)
    sum *= (SymbolTable[No].Vector[i]);
    return sum;
    }int CzybCompile::Access_a(int No) //NO&ordm;&not;&Ograve;&aring;&Iacute;&not;&Eacute;&Iuml;&pound;&not;&Egrave;&iexcl;&Auml;&Uacute;&Ccedil;é&Iuml;ò&Aacute;&iquest;&Ouml;&ETH;&micro;&Auml;a&Ouml;&micro;
    {
    return 0;
    }int CzybCompile::Access_d(int No, int k)//NO&ordm;&not;&Ograve;&aring;&Iacute;&not;&Eacute;&Iuml;&pound;&not;&Egrave;&iexcl;&Ecirc;&yacute;×é&micro;&Auml;&micro;&Uacute;k&Icirc;&not;&frac12;&ccedil;&sup2;&icirc;
    {
    return SymbolTable[No].Vector[k];
    }char* CzybCompile::GetSymbolName(int No)
    {
    return "";
    }bool CzybCompile::GetSymbolDef(int No)
    {
      return TRUE;
    }int CzybCompile::SetOperation(YYSTYPE *yyvsp1, YYSTYPE *yyvsp2, YYSTYPE *yyvsp3)
    {
    int type;
    if(yyvsp1->Type == CT_FLOAT || yyvsp2->Type == CT_FLOAT)
    type = CT_FLOAT;
    else if(yyvsp1->Type == CT_INT || yyvsp2->Type == CT_INT)
    type = CT_INT;
    else
    type = CT_CHAR;
    int T = NewTemp(type);
    FillVarType(T, type);
    if(yyvsp1->tokenval == _CONSTANT && yyvsp3->tokenval == _CONSTANT)
    {
    Trip(yyvsp2->tokenval, 
    IS_CONSTANT, yyvsp1->TypeValue, 
    IS_CONSTANT, yyvsp3->TypeValue, GetArgType(T), SymbolTable[T].addr);
    }else if(yyvsp1->tokenval == _CONSTANT)
    {
    Trip(yyvsp2->tokenval, 
    IS_CONSTANT, yyvsp1->TypeValue, 
    GetArgType(yyvsp3->Place), SymbolTable[yyvsp3->Place].addr, GetArgType(T), SymbolTable[T].addr);
    }else if(yyvsp3->tokenval == _CONSTANT)
    {
    Trip(yyvsp2->tokenval, 
    GetArgType(yyvsp1->Place), SymbolTable[yyvsp1->Place].addr, 
    IS_CONSTANT, yyvsp3->TypeValue, GetArgType(T), SymbolTable[T].addr);
    }else
    {
    Trip(yyvsp2->tokenval,
    GetArgType(yyvsp1->Place), SymbolTable[yyvsp1->Place].addr, 
    GetArgType(yyvsp3->Place), SymbolTable[yyvsp3->Place].addr, GetArgType(T), SymbolTable[T].addr);
    }
    return T;
    }void CzybCompile::ClearTemp()
    {
    TempCharPoint = 0;
    TempIntPoint = 0;
    TempFloatPoint = 0;
    }int CzybCompile::GetArgType(int Addr)
    {
    int Value = NULL;
    switch(SymbolTable[Addr].type)
    {
    case CT_CHAR: Value = (int(SymbolTable[Addr].IsTemp) * 3) + 2;
    break;
    case CT_INT: Value = (int(SymbolTable[Addr].IsTemp) * 3) + 3;
    break;
    case CT_FLOAT:Value = (int(SymbolTable[Addr].IsTemp) * 3) + 4;
    break;
    }
    return Value;
    }
      

  7.   

    嘿嘿,我要说的是三点。
    0、前面看了一篇骂日本人的文章,后来又想到骂美国人的文章。国人当自强,帮人也不是这么帮,都这样,一百年后不是继续给人当孙子就是没有中国了。考试要靠自己,我最恨做假上去的人,尤其工商、税务最难做关系的;
    1、做程序员当如以前的侠客,不必管求助的对方是否美女,或者不是,应当一律拨刀相助。我看国外的论坛及新闻组,就没有这样的事情(别说我崇洋妹外,别人已经那么先进尚且如此相助,咱们就不要思利忘义了);
    2、帖子的主人,知道你比较着急,可以没有必要埋怨dragon_xhf(飞飞),我觉得他这么做,不损你的事,反而帮了你的事。否则他自己开个话题,肯定比在你的话题中更加能争取别人的帮助。
      

  8.   

    雅痞再次到此一游,
    哪日来copy这些代码研究:)