 			Mono JScript .Net Compiler

			    Cesar Lopez Nataren
		          (cesar@ciencias.unam.mx)
				    2003

Structure: Divided by compilation phase.

Lexical Analysis: We use the Antlr [1] lexer generator for
producing the one needed for our compiler. But, the Microsoft.JScript
namespace, exposes some classes related to that task. Those are:
- JSToken
- JSScanner
- Context
- DocumentContext
- JScriptLexer, this is the class generated by Antlr.


Syntax Analysis and Abstract Syntax Tree construction:

* jscript-lexer-parser.g: This is the grammar file, written in
  Antlr metalanguage. If you want to hack on the grammar, there are
some pieces missing:

	- Full support of Ecmascript grammar defined on Standard
	  ECMA-262, 3rd Edition. There are some corner 
	  cases that we still do not handle.

	- Add the extensions from MS, like classes, interfaces, etc.

  We are currently using Antlr 2.7.2, you can get it from: 
  http://antlr.org/download.html.

  You must installed it, it depends on java runtime.

  You can generate the new parser and lexer with something like:

  [x@y] java -cp /your/path/to/antlr-2.7.2 antlr.Tool -traceParser jscript-lexer-parser.g

  Then, build Microsoft.JScript.dll (type make on: mcs/class/Microsoft.JScript).

  And finally compile driver.cs, with:

  [x@y] mcs /debug+ /out:mjs.exe /r:../../lib/Microsoft.JScript.dll driver.cs


- AST
- ASTList
- ArrayLiteral
- BinaryOp
- Binding *
- BitwiseBinary
- Block
- DebugBreak *
- Enum
- Equality
- Eval
- ForIn *
- FunctionDeclaration (used at runtime, too).
- FunctionExpression
- Import (used at runtime,too).
- JSParser
- JScriptParser is the parser generated by Antlr.
- Literal
- NumericBinary (used at runtime, too).
- Package
- Print
- ScriptBlock
- Statement (we could delete this one)
- Throw
- Try
- UnaryOp
- VariableDeclaration
- VariableStatement
- With


Visual Studio for Applications (VSA), execution support:
- BaseVsaEngine
- GlobalScope
- IRedirectOutput
- VsaEngine
- ActivationObject
- ScriptObject
- IActivationObject

Some other execution support classes:
- JSLocalField
- JSFunctionAttribute
- JSFunctionAttributeEnum


Object System:
- JSObject
- BooleanObject
- ArrayObject
- DateObject
- EnumeratorObject
- ErrorObject
- EvalErrorObject
- FunctionObject
- GlobalObject
- IActivationObject
- JSPrototypeObject
- MathObject
- NumberObject
- RegExpObject 
- StringObject
- VBArrayObject

- ArrayPrototype
- BooleanPrototype
- DatePrototype
- EnumeratorPrototype
- ErrorPrototype
- FunctionPrototype
- NumberPrototype
- ObjectPrototype
- RegExPrototype
- StringPrototype
- VBArrayPrototype


Non-strict object system:
- LenientGlobalObject
- LenientMathObject

- LenientArrayPrototype
- LenientBooleanPrototype
- LenientDatePrototype
- LenientEnumeratorPrototype
- LenientErrorPrototype
- LenientFunctionPrototype
- LenientMathObject
- LenientNumberPrototype
- LenientObjectPrototype
- LenientRegExpPrototype
- LenientStringPrototype
- LenientVBArrayPrototype

I/O support:
- ScriptStream


Utils:
- Convert



[1] You can get info about it at: http://antlr.org
