コード例 #1
0
        bool Module(string name, out AST.Module module)
        {
            module = new AST.Module(name);
_0:
            if (scan.Lexeme == Lexeme.EndMarker)
            {
                goto _end;
            }
            if (Stmnt(module.Statements))
            {
                goto _0;
            }
            throw new CompilationError(ErrorType.InvalidSyntax);
_end:
            return(true);
        }
コード例 #2
0
 public Parser(string filename, string name, out AST.Module module)
 {
     scan = new Scanner(filename);
     Module(name, out module);
 }