Differences From Artifact [6bec0997c5764737]:
- File        
polemy/parse.d
- 2010-11-20 09:20:03 - part of checkin [515502e8d1] on branch trunk - table get, init, ask expressions addded (user: kinaba) [annotate]
 
To Artifact [a024e7c2d40e70c4]:
- File        
polemy/parse.d
- 2010-11-20 16:35:14 - part of checkin [3464a035ec] on branch trunk - source code cleanup (user: kinaba) [annotate]
 
    2   * Authors: k.inaba                                                                    2   * Authors: k.inaba
    3   * License: NYSL 0.9982 http://www.kmonos.net/nysl/                                    3   * License: NYSL 0.9982 http://www.kmonos.net/nysl/
    4   *                                                                                     4   *
    5   * Parser for Polemy programming language                                              5   * Parser for Polemy programming language
    6   */                                                                                    6   */
    7  module polemy.parse;                                                                   7  module polemy.parse;
    8  import polemy._common;                                                                 8  import polemy._common;
                                                                                        >     9  import polemy.failure;
    9  import polemy.lex;                                                                    10  import polemy.lex;
   10  import polemy.ast;                                                                    11  import polemy.ast;
   11                                                                                        12  
   12  /// Thrown when encountered a syntax error                                       <
   13                                                                                   <
   14  class ParseException : Exception                                                 <
   15  {                                                                                <
   16          mixin ExceptionWithPosition;                                             <
   17  }                                                                                <
   18                                                                                   <
   19  /// Parse a string and return its AST                                                 13  /// Parse a string and return its AST
   20  /// Throws: ParseException, LexException, UnexpectedEOF                               14  /// Throws: ParseException, LexException, UnexpectedEOF
   21                                                                                        15  
   22  AST parseString(S, T...)(S str, T fn_ln_cn)                                           16  AST parseString(S, T...)(S str, T fn_ln_cn)
   23  {                                                                                     17  {
   24          return parserFromString(str, fn_ln_cn).parse();                               18          return parserFromString(str, fn_ln_cn).parse();
   25  }                                                                                     19  }