예제 #1
0
파일: Lexer.cs 프로젝트: WMeszar/Cottle
        public Lexer(LexerConfig config)
        {
            this.blocks = new LexemMatch[]
            {
                new LexemMatch (LexemType.BraceBegin, config.BlockBegin),
                new LexemMatch (LexemType.Pipe, config.BlockContinue),
                new LexemMatch (LexemType.BraceEnd, config.BlockEnd)
            };

            this.pending = new LexemMatch (LexemType.None, string.Empty);
        }
예제 #2
0
파일: Parser.cs 프로젝트: WMeszar/Cottle
 public Parser(LexerConfig config)
 {
     this.lexer = new Lexer (config);
 }
예제 #3
0
파일: Document.cs 프로젝트: WMeszar/Cottle
 public Document(string template, LexerConfig config)
     : this(new StringReader (template), config)
 {
 }
예제 #4
0
파일: Document.cs 프로젝트: WMeszar/Cottle
        public Document(TextReader reader, LexerConfig config)
        {
            Parser  parser = new Parser (config);

            this.root = parser.Parse (reader);
        }