Пример #1
0
        public void RuleTableTest2()
        {
            var tbl = new LexicalRuleTable();
            tbl.Add(new NumericLiteralLexicalRule());

            Assert.AreEqual(1, new List<LexicalRule>(tbl.RulesForStartChar('3')).Count);
        }
Пример #2
0
        public void RuleTableTest1()
        {
            var tbl = new LexicalRuleTable();
            tbl.Add(new LexicalRule(".", Sym.Dot));
            tbl.Add(new LexicalRule("..", Sym.Colon));

            Assert.AreEqual(2, new List<LexicalRule>(tbl.RulesForStartChar('.')).Count);
        }