コード例 #1
0
        public BFInt(string program, string input, EofSetting set, bool useExtentions)
        {
            //initialize variables
            sqOpenBrace  = new Dictionary <int, int>();
            sqCloseBrace = new Dictionary <int, int>();
            rndOpenBrace = new Dictionary <int, int>();
            tape         = new List <byte>();

            supportExtentions = useExtentions;

            if (program == null)
            {
                throw (new Exception("Program cannot be null."));
            }
            else
            {
                //preprocess the program
                prog = processProgram(program);
            }
            this.input = input;

            //make our initial cell
            tape.Add(0);

            setting = set;
        }
コード例 #2
0
ファイル: BFint.cs プロジェクト: sjanderton/BrainFuzz
        public BFInt(string program, string input, EofSetting set, bool useExtentions)
        {
            //initialize variables
            sqOpenBrace = new Dictionary<int, int>();
            sqCloseBrace = new Dictionary<int, int>();
            rndOpenBrace = new Dictionary<int, int>();
            tape = new List<byte>();

            supportExtentions = useExtentions;

            if (program == null)
            {
                throw (new Exception("Program cannot be null."));
            }
            else
            {
                //preprocess the program
                prog = processProgram(program);
            }
            this.input = input;

            //make our initial cell
            tape.Add(0);

            setting = set;
        }