2003-09-20 <cesar@ciencias.unam.mx>
authorCésar Natarén <cesar@mono-cvs.ximian.com>
Sat, 20 Sep 2003 17:34:44 +0000 (17:34 -0000)
committerCésar Natarén <cesar@mono-cvs.ximian.com>
Sat, 20 Sep 2003 17:34:44 +0000 (17:34 -0000)
* driver.cs: Deleted the Jsc class. We are not generating code
now. I'm moving to provide something like mcs's EmitContext
instead of the CodeGenerator class having the Reflection.Emit
builders and ILGenerator. This driver is just for Lexical and
Parsing phases testing.

svn path=/trunk/mcs/; revision=18219

mcs/class/Microsoft.JScript/Microsoft.JScript/ChangeLog
mcs/class/Microsoft.JScript/Microsoft.JScript/driver.cs

index 679630d7c31e448cb599ab2757388baf86fcb7cf..49ded9ab82d8519aca35aef2b776fcfa9a0ef3d0 100644 (file)
@@ -1,5 +1,11 @@
 2003-09-20    <cesar@ciencias.unam.mx>
 
+       * driver.cs: Deleted the Jsc class. We are not generating code
+       now. I'm moving to provide something like mcs's EmitContext
+       instead of the CodeGenerator class having the Reflection.Emit
+       builders and ILGenerator. This driver is just for Lexical and
+       Parsing phases testing.
+
        * driver.cs: Now we are using the Microsoft.JScript public API
        functions to load the lexer and parser.
 
index b06a92d274bed1e376ef6f508ce4323fbd5e0307..7d438693a702bef8741ba616ee7d002fec9ea392 100644 (file)
@@ -7,64 +7,19 @@
 // (C) 2003, Cesar Lopez Nataren
 //
 
-namespace Microsoft.JScript.Tmp
-{
-       using System;
-       using System.IO;
-       using System.Collections;
-       using System.Reflection.Emit;
-       using System.Reflection;
-       using System.Runtime.CompilerServices;
-
-       public class Jsc 
-       {
-               string filename;
-               string assemblyName;
-               ASTList program;
-               SemanticAnaliser semAnalizer;
-               CodeGenerator codeGen;
-
-               public Jsc (string filename)
-               {
-                       this.filename = filename;
-                       this.assemblyName = Path.GetFileNameWithoutExtension (filename);
-
-                       program = new ASTList ();
-               }
-
-
-               public void Run ()
-               {
-                       this.GetAST (filename);
-                       // this.SemanticAnalysis ();
-                       this.GenerateCode ();
-
-                       this.codeGen.assemblyBuilder.Save (assemblyName + ".exe");
-               }
-
-                       
-               public void GenerateCode ()
-               {
-                       this.codeGen = new CodeGenerator (assemblyName,
-                                                         AssemblyBuilderAccess.RunAndSave);
-
-                       this.codeGen.EmitJScript0 (this.program);
-                       this.codeGen.EmitJScriptMain ();                        
-               }
-
-
-               public void GetAST (string filename)
-               {
-                       StreamReader reader = new StreamReader (filename);
-                       JScriptLexer lexer = new JScriptLexer (reader);
-                       JScriptParser parser = new JScriptParser (lexer);
-
-                       // parser.program (program);
-               }
-
-
-               public static void Main (string [] args)
-               {
+using System;
+using System.IO;
+using System.Collections;
+using System.Reflection.Emit;
+using System.Reflection;
+using System.Runtime.CompilerServices;
+
+namespace Microsoft.JScript.Tmp {
+
+       public class Driver {
+               
+               public static void Main (string [] args) {
+       
                        if (args.Length < 1) {
                                Console.WriteLine ("Usage: [mono] mjs.exe filename.js");
                                Environment.Exit (0);
@@ -77,4 +32,4 @@ namespace Microsoft.JScript.Tmp
                        ScriptBlock prog_tree = parser.Parse ();
                }
        }
-}
+}
\ No newline at end of file