Example #1
0
        public Logic_Stat clone()
        {
            Logic_Stat logic_Stat = new Logic_Stat();

            logic_Stat.startExp  = startExp;
            logic_Stat.endExp    = endExp;
            logic_Stat.periodExp = periodExp;
            return(logic_Stat);
        }
Example #2
0
        private Logic_Stat match_logic_stat()
        {
            int        backup     = index;
            Logic_Stat logic_Stat = new Logic_Stat();

            if (!match("at"))
            {
                return(null);
            }
            if (match("init"))
            {
                logic_Stat.startExp = Exp.getInstance(-1);
            }
            else if (match("final"))
            {
                logic_Stat.startExp = Exp.getInstance(-2);
            }
            else
            {
                logic_Stat.startExp = match_expression();
                if (logic_Stat == null)
                {
                    return(null);
                }

                if (match(":"))
                {
                    logic_Stat.endExp = match_expression();
                }
                if (match(","))
                {
                    logic_Stat.periodExp = match_expression();
                }
            }
            if (!match(";"))
            {
                LogWriter.WriteLexText(lineNo, "expect \";\"");
            }
            return(logic_Stat);
        }