2004-08-25 Cesar Lopez Nataren <cesar@ciencias.unam.mx>
[mono.git] / mcs / class / Microsoft.JScript / Microsoft.JScript / ChangeLog
1 2004-08-25  Cesar Lopez Nataren  <cesar@ciencias.unam.mx>
2
3         * BinaryOp.cs: renamed current_op to simply op as with the new
4         parser we no longer need to keep track of the old_op.
5
6 2004-08-24  Cesar Lopez Nataren  <cesar@ciencias.unam.mx>
7
8         * expression.cs: do not pass the operand as a parameter to the
9         constructor as it gets after the parent gets constructed, same
10         with binary. Added code generation for array index access.
11         * Parser.cs: added ToJStoken which converts Token to JSToken,
12         factored the code for creation the Unary nodes. Take care of
13         parent relationship.
14         * LateBinding.cs: back to Microsoft.JScript namespace.
15         
16
17 2004-08-23  Cesar Lopez Nataren  <cesar@ciencias.unam.mx>
18
19         * Parser.cs: pass the skip_count to ArrayLiteral constructor.
20         * Missing.cs: back to Microsoft.JScript namespace.
21         * ArrayLiteral.cs: added field skip_count, it tells us if this is
22         a spaced-arrayliteral, in which case we add a null value in the
23         list, added null check in the resolve and code generation process.
24
25 2004-08-21  Cesar Lopez Nataren  <cesar@ciencias.unam.mx>
26
27         * expression.cs: added interface ICallable and and function AddArg
28         to class Call. Added class New.
29         * driver.cs: made it use the new lexer and parser.
30         * ast.cs: added field line_number, added property InFunction,
31         added class Function that factores all the code shared between
32         FunctionDeclaration and FunctionExpression.
33         * With.cs: constructor receives line number.
34         * VariableStatement.cs: constructor receives line number.       
35         * VariableDeclaration.cs: Added check for parent being
36         FunctionDeclaration and FunctionExpression.
37         * Try.cs: Moved the code that used to take care of the catch to
38         Catch class. Constructor receives forming elements and line
39         number. Removed mangle_id.
40         * Throw.cs: constructor receives line number.
41         * Statement.cs: If, DoWhile, Return  constructor receives line number. Renamed
42         identifier to label in Continue and Break class, its constructor now
43         receives the label and line number. For class, constructor
44         receives its forming parts. Switch class, constructor receives
45         line number, added function AddClause and AddStm. Added class
46         Catch. Added class Labelled.
47         * SemanticAnalyser.cs: Added field anon_method_counter, properties
48         NextAnonymousMethod and CurrentAnonymousMethod.
49         * Parser.cs: function ArgumentList receives a ICallable list
50         instead of a AST. Now we add the arguments of a callable. Build
51         Call's ast.
52         * Literal.cs: added constructor for 'this' literal and
53         ObjectLiteral constructor. Added RegExpLiteral class, will take
54         care of regular expressions semantic analysis and code generation.
55         * JSScanner.cs: use no more the antlr based lexer. Fix typo.
56         * JSParser.cs: make it use the new port of Rhino's Parser.
57         * FunctionObject.cs: Added constructor that receives the function name.
58         * FunctionExpression.cs: made it inherit from Function class. Added
59         constructor. Factored the code that used to set the prefix to
60         Function.set_prefix (it's shared with FunctionDeclaration). Added
61         fields local_script_func and field. Implemented Resolve and Emit
62         (now we can do: var x = function (this, method, is, anonymous) {... };).        
63         * FunctionDeclaration.cs: made it inherit from Function class in
64         order to share code with FunctionExpression. Added new
65         constructor. Moved the code that used to built the prefix to
66         Function inside function set_prefix. When building the closure
67         added check for  setting the type of a FunctionExpression. Moved
68         set_function_type and set_custom_attr to class Function. 
69         * ForIn.cs: added constructor and fields lhs, obj and body.
70         * Block.cs: added default constructor and line number based
71         constructor. Check for elems not being null before adding.
72         * ArrayLiteral.cs: set elements in constructor.
73         
74 2004-07-29  Cesar Lopez Nataren  <cesar@ciencias.unam.mx>
75
76         * Parser.cs: Added ClauseType enum. Added all the statements to current_script_or_fn,
77         building the other block was not needed. Build the ast's for the
78         expressions and statements, keep track of the parent relationship.
79
80 2004-07-19  Cesar Lopez Nataren  <cesar@ciencias.unam.mx>
81
82         * Added Token.cs, TokenStream.cs, Parser.cs which are the port of
83         Mozilla/Rhino's  parser.
84
85 2004-06-24  Cesar Lopez Nataren  <cesar@ciencias.unam.mx>
86
87         * jscript-lexer-parser.g: added ast building for object_literal,
88         it's disabled for now while I fix the "block Vs object_literal"
89         non-determinism problem on the parser. Added rule for
90         array_literal. Build PropertyName ast build.
91         * Literal.cs: fixed the negative numbers code generation (we must
92         optimize this). Added initial ObjectLiteral's class, code generation and
93         Resolve process. Added class ObjectLiteralItem and PropertyName.
94         * ArrayLiteral.cs: added internal size field as an ArrayLiteral can have
95         elisions we keep track of the "real" size here. Added constructor. Added initial
96         Resolve and Emit code.
97         * ASTList.cs: added Size property. 
98         * Globals.cs, ASTList.cs: Back to the useful namespace (M.J).
99
100 2004-06-20  Cesar Lopez Nataren  <cesar@ciencias.unam.mx>
101
102         * CodeGenerator.cs: Added LoopBegin and LoopEnd to EmitContext, they are used by
103         break and continue in order to jump to the desired place. Added
104         check for converting to boolean if we encounter an identifier (at need_convert_to_boolean).
105         * Statement.cs: class If.Emit, call fall_true instead of fall_false so we don't
106         need to jump if the expression evaluates to true. Continue class,
107         replaced ParentIsItrStm with InLoop, emit jump to correct
108         place. Break class, implemented Resolve; deleted
109         ParentIsCorrect. DoWhile, While classes, set LoopBegin and
110         LoopEnd. While class, set LoopBegin and LoopEnd. 
111         * ast.cs: Added InLoop and InSwitch.
112         * jscript-lexer-parser.g: pass parent to break_stm. Added block as
113         a statement. Temporarily disabled object_literal in order to test
114         the block structure and continue and break statements.
115         
116 2004-05-28  Cesar Lopez Nataren  <cesar@ciencias.unam.mx>
117
118         * Statement.cs: changed parent_is_itr_stm method to ParentIsItrStm
119         property. Added initial pieces for Break's Resolve. Fixed bug that
120         did not let Emit the code for case clauses that came after the
121         default clause (we match the jsc behavior).
122         * jscript-lexer-parser.g: set parent of switch's clauses.
123
124 2004-05-27  Cesar Lopez Nataren  <cesar@ciencias.unam.mx>
125
126         * Statement.cs: added parent as a parameter on Continue constructor. Added parent_is_itr_stm
127         * jscript-lexer-parser.g: set parent hierarchy for continue
128         statement. Set to correct parent in iteration_stm.
129
130 2004-05-24  Cesar Lopez Nataren  <cesar@ciencias.unam.mx>
131
132         * StrictEquality.cs, JSFieldInfo.cs: got it back to Microsoft.JScript namespace.
133
134         * Statement.cs: Added code generation support for 'switch' statement.
135
136         * jscript-lexer-parser.g: added 'using' for
137         System.Collections. Allow 'switch' statement building of its
138         ast. Added parent parameter to constructor of With. Build
139         inside_for ast. 
140
141         * With.cs: code generation support for 'with' stm.
142
143 2004-05-21  Cesar Lopez Nataren  <cesar@ciencias.unam.mx>
144
145         * Statement.cs: initial code generation of 'for'.
146         * jscript-lexer-parser.g: let's build for's ast.
147
148 2004-05-18  Cesar Lopez Nataren  <cesar@ciencias.unam.mx>
149
150         * jscript-lexer-parser.g: let's build Try/Catch/Finally ast.
151         * expression.cs: handle Try case for field or local vars allocation. 
152         * Try.cs: implemented Emit.
153         * Throw.cs: implemented code generation.
154         * FunctionDeclaration.cs: cache some values.
155
156 2004-04-26  Cesar Lopez Nataren  <cesar@ciencias.unam.mx>
157
158         * FunctionDeclaration.cs: let's make function name formation
159         (get_name ()) a little bit less dumb. We cache the prefix now so
160         we don't have to recalculate it everytime.
161
162 2004-04-22  Cesar Lopez Nataren  <cesar@ciencias.unam.mx>
163
164         * Literal.cs: emit the correct code for negative numbers.
165         * jscript-lexer-parser.g: set parent unary_expr.
166
167 2004-04-18  Cesar Lopez Nataren  <cesar@ciencias.unam.mx>
168
169         * expression.cs: added code generation for 'x1 ? x2 :x3' op.
170         * Statement.cs: Added code generation for while and do-while.
171
172 2004-04-17  Cesar Lopez Nataren  <cesar@ciencias.unam.mx>
173
174         * Statement.cs (class if): reimplemented Emit based on fall_false.
175         * Equality.cs: added code generation for != and emit jumping code
176         only in the case we are at a global expression not statement.
177         * CodeGenerator.cs (fall_true, fall_false): Check if convertion to
178         boolean needed. Made emit_to_boolean internal. Added need_convert_to_boolean.
179
180 2004-04-14  Cesar Lopez Nataren  <cesar@ciencias.unam.mx>
181
182         * expression.cs (Binary.Emit): treat boolean operator
183         specially. Added emit_jumping_code.
184         * CodeGenerator.cs: Added emit_to_boolean. Added fall_true and
185         fall_false, which will express all boolean expressions and control
186         flow conditions. 
187
188 2004-04-02  Cesar Lopez Nataren  <cesar@ciencias.unam.mx>
189
190         * Equality.cs: Moved the Emit and Resolve code here.
191         * jscript-lexer-parser.g: Build a Equality object instead of a
192         Binary object for equality_expr.
193         * expression.cs: moved equality oeprators (resolve and IL gen) to
194         Equality.Emit and Equality.Resolve.
195
196 2004-03-31  Cesar Lopez Nataren  <cesar@ciencias.unam.mx>
197
198         * expression.cs: Added shift operators IL emit.
199         * BitwiseBinary.cs: added constructor for building it according to
200         JSToken enum. return a new object on EvaluateBitwiseBinary (this
201         needs a real implementation).
202         * expression.cs: added code for evaluation of bitwise operators at emit_op_eval.
203
204         * Statement.cs: added stub for While and DoWhile ast
205         representation (reworking my Emit code).
206         * jscript-parser-lexer.g: allow iteration statement ast build.
207
208         * FunctionDeclaration.cs: agrouped code for setting custom attribute.
209
210         * expression.cs: added Modulo operator case.
211
212 2004-03-16  Cesar Lopez Nataren  <cesar@ciencias.unam.mx>
213
214         * Convert.cs: added rule for string conversion.
215
216         * Plus.cs: added rule for string addition.
217
218         * PostOrPrefixOperator.cs: added constructor, returned to Microsoft.JScript ns, initial Resolve and
219         Emit (cases where there's no real operator).
220
221         * StringLiteral.cs: now implements Exp as can appear as a simple
222         exp in global code. Added check for Pop generation.
223
224         * expression.cs: added IL generation code for print func call. 
225         Args class added get_element, Size and made Resolve behave as the
226         others (collect the differents Resolve's return values from each
227         of the arguments). Expression class, added default Resolve call
228         for non-Exp implementers.
229
230         * jscript-lexer-parser.g: postfix_expr rule now returns a simple
231         AST, this handles the case where no postOrPrefixOp present; Unary
232         returns an AST too.
233
234         * FormalParameterList.cs: added get_element, retrieves nth element.
235
236 2004-03-14  Cesar Lopez Nataren  <cesar@ciencias.unam.mx>
237
238         * ScriptStream.cs: let's print some messages.
239
240         * jscript-lexer-parser.g (STRING_LITERAL): Do not include the ' in the text of the rule.
241
242 2004-03-13  Cesar Lopez Nataren  <cesar@ciencias.unam.mx>
243
244         * jscript-lexer-parser.g: keep track of return's parent.
245         * Statement.cs: added parent parameter to constructor.
246
247         * expression.cs: refactored Emit code from Identifier, now we take
248         care of function's paramenter references. First attack to function
249         calls, check if Resolve from Call succeed.
250         
251         * VariableDeclaration.cs: Deleted Decl class, field_info and
252         local_builder fields were being used only by VariableDeclaration,
253         I'll keep them there.
254         
255         * FormalParameterList.cs: added field pos to FormalParam, and set
256         it at FormalParameterList's Resolve stage. 
257         
258         * TODO: updated TODO.
259
260 2004-03-07  Cesar Lopez Nataren  <cesar@ciencias.unam.mx>
261
262         * jscript-lexer-parser.g: build If's ast. Keep track of expr parent.
263
264         * expression.cs: At class Conditional renamed fields. Class
265         Expression inherits from Exp as we must keep track if we must pop
266         the last value (this is for the comma operator), track the parent,
267         at Resolve we take care of the last value of the expression, 
268
269         * VariableDeclaration.cs: updates needed because of EmitContext change.
270
271         * Statement.cs: added parent param to If constructor. Implement
272         Resolve and Emit for If statement.
273
274         * Relational.cs: Set parent. The boxing happens in the containing statement.
275
276         * FunctionDeclaration.cs: Added func_type field, will be used to determine the
277         type of the function we are generating (global function, method
278         from a class, etc) and attach to it the correct custom
279         attribute. Simplified the code for nested functions: 
280         refactored the code so no code duplication is involved, now we
281         have only one function that retrieves  the name of the function,
282         now create a new EmitContext for the body of the method.
283
284         * FormalParameterList.cs, Literal.cs, StringLiteral.cs:  use
285         current EmitContext's ILGenerator. 
286
287         * Convert.cs: Do not throw the NotImplementedException anymore for
288         method ToBoolean, for now we always return false. This must get a
289         real implementation.
290
291         * CodeGenerator.cs:  Deleted one of ILGenerator fields
292         from EmitContext, suffices using only one (more notes about the
293         change on the Functiondeclaration entry). Imitate jsc behavior for
294         compiled files names, aggregate the exe or dll extension after last dot.
295
296         * Block.cs: In order to implement the comma operator (i.e., expression,
297         assign_exp), we must track if our expressions are at a global
298         scope, in which case we must pop the last result too.
299
300 2004-01-25  Cesar Lopez Nataren  <cesar@ciencias.unam.mx>
301
302         * Relational.cs: Initial generation of CIL for relational operators.
303
304 2004-01-23  Cesar Lopez Nataren  <cesar@ciencias.unam.mx>
305
306         * jscript-lexer-parser.g: formal_param_list receives a parent too.
307
308         * SymbolTable.cs: added size and current_symbols properties.
309
310         * JSLocalField.cs: don't throw not ImplementedException from
311         constructor (same reason, testing purposes, must get implemented
312         for real).
313
314         * IdentificationTable.cs: added num_of_locals and current_locals properties.
315
316         * FunctionDeclaration.cs: added a LocalBuilder and DictionaryEntry
317         as fields. Not throw NotImplementedException for
318         JScriptFunctionDeclaration (testing purposes, must get implemeted
319         for real). Let's build our function closures! Added functions:
320         build_closure and build_closure_nested, build_local_fields. Keep
321         track of current parameters and locals defs.
322
323         * FormalParameterList.cs: made FormalParam inherit from
324         AST. Implement the Emit for parameters, yeah!
325
326         * CodeGenerator.cs: added a ModuleBuilder reference. New constructor.   
327
328         * Closure.cs: do not throw the exception (this allow me to run the
329         tests  at mcs/jtests and check that at least i'm not generating
330         invalid CIL). Be aware that this must be really implemented.
331
332         * Block.cs: renamed field, and implement the double pass for
333         nested function declarations code emittion, yeah!.
334
335 2004-01-16  Cesar Lopez Nataren  <cesar@ciencias.unam.mx>
336
337         * Microsoft.JScript/VsaReferenceItem.cs: renamed field, reuse parent's ctr.
338         * Microsoft.JScript/VsaItem.cs: renamed some fields, added ctr, 
339         * Microsoft.JScript/VsaGlobalItem.cs: reuse parent ctr.
340         * Microsoft.JScript/VsaCodeItem.cs: reuse parent ctr.
341         * Microsoft.JScript/GlobalScope.cs: reuse constructors from parent.
342
343         * UnaryOp.cs: inherit from Exp now.
344         * Plus.cs: Don't throw the exception when calling constructor, let
345         it build the default handler. Return a new object when calling
346         EvaluatePlus until properly implemented.
347
348         * NumericUnary.cs: added new Resolve.
349         * NumericBinary.cs: assign operator val at ctr. Return a new
350         object when calling EvaluateNumericBinary until properly
351         implemented. Added Resolve.
352         * Equality.cs: added ctr and return false for EvaluateEquality
353         until properly implemented. Added Resolve's functions.
354
355         * Block.cs (Resolve): That check was not necessary.
356         
357         * InstanceOf.cs, PostOrPrefixOperator.cs, Relational.cs,
358         StrictEquality.cs, TypeOf.cs: added Resolve inherited from
359         BinaryOp and UnaryOp, and this from Exp.
360         * IdentificationTable.cs, ScriptBlock.cs: deleted debugging messages.
361         * jscript-lexer-parser.g: deleted debugging messages. Create a
362         Assign object instance of a simple Binary obj. Same case for Equality.
363
364         * expression.cs: added Exp abstract class. Classes that are ast of
365         language constructions that can appear as global expressions that
366         get evaluated and then the result is discarded inherit from this
367         new class. This let meee keep track of things that must get Popped
368         or can even avoid the evaluation of it. Wrote real Resolve method
369         for classes: Unary, Binary.
370         Implemted Emit method for some binary operations (+, -, / and *),
371         for other operators some more code is still missing.    
372         Identifier: handle assignment cases and global exp cases.
373         Added class Assign (compisite assignment still missing tough :-(
374
375         * driver.cs: deleted debug messages, added "Compilation Succeeded"
376         message ;-).
377         * VariableStatement.cs, VariableDeclaration.cs: wrote real Resolve method.      
378         * Literal.cs (BooleanLiteral, NumericLiteral): now inherits from
379         Exp and handle the case for global expressions that must be popped
380         after evaluation. no more invalid IL being generated! yeah!
381         * Block.cs: wrote real Resolve method, erased debug messages.
382         * BitwiseBinary.cs, InstanceOf.cs, UnaryOp.cs: : add new Resolve inherited from Exp.
383         * BinaryOp.cs, Conditional: now inherits from Exp.
384
385 2004-01-15  Cesar Lopez Nataren  <cesar@ciencias.unam.mx>
386
387         * ReferenceAttribute.cs: moved it back to namespace Microsoft.JScript.
388
389         * CodeGenerator.cs: small fixes to generate same things that ms.
390
391 2004-01-13  Cesar Lopez Nataren  <cesar@ciencias.unam.mx>
392
393         * VariableDeclaration.cs: get the this.type which is a Type not a TypeBuilder.
394
395 2004-01-12  Atsushi Enomoto  <atsushi@ximian.com>
396
397         * JSMethodInfo.cs : tiny fix for NET_2_0 build.
398
399 2003-12-24  Cesar Lopez Nataren  <cesar@ciencias.unam.mx>
400
401         * jscript-lexer-parser.g: keep track of parent reference for
402         IDENTIFIER, STRING_LITERAL.
403
404         * expression.cs: Added 'binding' field. Added 'parent' parameter
405         to constructor. Now we emit the proper code for the identifier.
406
407         * VariableStatement.cs: updated to field names instead of the old
408         property's name.
409
410         * VariableDeclaration.cs: Added class Decl, it constains the
411         references to the static field or LocalBuilder that are created
412         when a declaration is emitted. Deleted unuseful properties (Id,
413         InitValue, Type).
414
415         * SymbolTable.cs: Deleted Retrieve method. Contains now returns an
416         object instead of a boolean.
417
418         * StringLiteral.cs: Deleted unuseful properties. Use ig instead of ec.ig.
419
420         * IdentificationTable.cs: Deleted Retrieve method. Contains method
421         now return an object instead of a boolean, that reference is the
422         binding associated with the identifier being searched.
423
424 2003-12-18  Cesar Lopez Nataren  <cesar@ciencias.unam.mx>
425
426         * jscript-lexer-parser.g: Keep track of parent for numeric_literal.
427
428         * VariableDeclaration.cs: now I handle initialization (ex. var x =
429         2; or function f () { var x = 4; }) at global scope or at
430         function's body.
431
432         * Literal.cs: Added parent param to NumericLiteral constructor.
433
434         * FunctionDeclaration.cs: Added Ret opcode for all function declaration bodies.
435
436 2003-12-17  Cesar Lopez Nataren  <cesar@ciencias.unam.mx>
437
438         * CodeGenerator.cs: Added IL emittion for ldnull on default ending code for 'Global Code'.
439
440 2003-12-10  Cesar Lopez Nataren  <cesar@ciencias.unam.mx>
441
442         * jscript-lexer-parser.g: added 'tokens { IN = "in"; INSTANCE_OF =
443         "instanceof"; }' in order to be able to parse both keywords. When
444         generating the parser, one warning about nondeterminism
445         (k==1:"in") is generated ignore it.
446
447 2003-12-07  Cesar Lopez Nataren  <cesar@ciencias.unam.mx>
448
449         * jscript-lexer-parser.g: things like 'new Point (10, 20).x' were
450         not parsable now they are. Mozilla's and Janet's  test suites are
451         being really helpful.
452
453 2003-12-05  Cesar Lopez Nataren  <cesar@ciencias.unam.mx>
454
455         * jscript-lexer-parser.g: added check for non-null reference at
456         var_decl_list rule. Added single quote STRING_LITERAL lexical rule
457         and multiple lines comments rule.
458
459         * jscript-lexer-parser.g: Now I keep track of the parent for most
460         of the syntatic constructs. Fixed object_literal rule.
461
462         * ast.cs: Added field parent. This will help me to track nested
463         blocks for all of the syntatic constructs and will allow to Emit
464         everything in one single pass.
465         * FunctionDeclaration.cs, FunctionExpression.cs: Rearranged the
466         parent stuff.
467         * Block.cs, FunctionObject.cs: deleted parent field as AST will
468         hold it. Delete parent parameter from constructor.
469         * CodeGenerator.cs: Add field gc_ig (global code IL generator) to
470         EmitContext class. The idea is Emitting everything in one pass (decls
471         and 'Global Code' method, the parent reference let me know which IL
472         generator use, gc_ig or ig).
473         * Equality.cs, BooleanLiteral, Relational.cs: Added new parameter to
474         constructor. Use new parent reference for choosing the IL
475         generator. NumericLiteral a 'hard coded' int32 IL emittion added
476         for testing. 
477         * StringLiteral.cs, Literal.cs (BooleanLiteral.Emit): now I use
478         the parent reference to infere which IL generator to use.
479         * VariableDeclaration.cs: deleted parent field. At Emit, now I use the parent
480         reference to infer which IL generator to use.
481         * expression.cs: Added paramenter parent to constructor of: Unary,
482         Binary, Conditional, Call.
483
484 2003-11-30  Cesar Lopez Nataren  <cesar@ciencias.unam.mx>
485
486         * expression.cs: Added new field to Call class, so it can handle more arguments.
487
488         * StringLiteral.cs (Emit) : Load the string value.
489
490         * Literal.cs: BooleanLiteral, Resolve always return true. Emit the value and box it to Boolean.
491
492         * CodeGenerator.cs: Set parent if 'JScript 0' to GlobalScope. Set
493         custom attribute. Build default 'JScript 0' constructor. Emit
494         default initial/final code of 'Global Code'. Create default
495         'JScript Main'.
496
497 2003-11-29  Cesar Lopez Nataren  <cesar@ciencias.unam.mx>
498
499         * jscript-lexer-grammar.g: define new rule 'arguments' instead of
500         repeating hand written rule all around. Change "." for DOT, dumb
501         mistake by myself. Added rule new_expr. Now we handle properly the
502         call_expr rule (as defined on the spec), and added a new
503         argument. Added subrule new_expr to  left_hand_side_expr rule.
504
505 2003-11-27  Cesar Lopez Nataren  <cesar@ciencias.unam.mx>
506
507         * expression.cs (Expression): implemented Emit.
508
509         * expression.cs (Binary): Emit now creates a local for the
510         different kinds of binary expressions (initial code for this).
511
512         * ast.cs: Emit method now is abstract instead of virtual.
513
514         * CodeGenerator.cs: changed no_global_code_method to is_global_code_method.
515
516         * ASTList.cs, ArrayLiteral.cs, BitwiseBinary.cs, DebugBreak.cs,
517         Enum.cs, Equality.cs, Eval.cs, ForIn.cs, FormalParameterList.cs,
518         FunctionExpression.cs, Import.cs, InstanceOf.cs, Literal.cs,
519         NumericLiteral, NumericBinary.cs, NumericUnary.cs, Package.cs,
520         Plus.cs, PostOrPrefixOperator.cs, Print.cs, Relational.cs,
521         Continue, Break, Return, StrictEquality.cs, StringLiteral.cs,
522         Throw.cs, Try.cs, TypeOf.cs, VariableDeclaration.cs, With.cs,
523         Conditional, Call, Identifier, Args, Expression, :
524         added Emit method.
525
526         * FunctionDeclaration.cs: Check if values are not null first (at
527         Resolve). Ignore code generation is at 'Global Code'.
528
529         * VariableDeclaration.cs: Now I take care of IL generation when we
530         are at statements and expressions at global code, 'Global Code'
531         method is populated with that IL.  
532
533         * CodeGenerator.cs: Added flag for 'Global Code' method
534         emittion. Now I call 'Emit' twice. The first for declarations the
535         follower for statements and expressions at global scope.
536         
537 2003-11-10 cesar lopez nataren <cesar@ciencias.unam.mx>
538
539         * Visitor.cs: Deleted.
540
541 2003-11-09 cesar lopez nataren <cesar@ciencias.unam.mx>
542
543         * FormalParameterList.cs: Now inherits from AST. Each of the
544         formal parameters gets into the IdentificationTable at Resolve.
545
546         * FunctionDeclaration.cs:Resolve (), We open a new block when
547         encountering a FunctionDeclaration, resolve de parameters and the
548         body, at the end we close the block.
549
550         * IdentificationTable.cs: Now we keep track of parent of the
551         current block. 'Enter (...)' now receives an object, not a
552         VarDecl. 'Contains' now take care of searching through the binding
553         chain.
554
555         * Literal.cs: Deleted 'Literal' class, was being used for
556         nothing. All the classes the inherited from it, now do it from
557         AST. A 'literal' does resolve to true by default.
558
559         * Relational.cs: Resolve recursively left and right.
560
561         * SemanticAnalyser.cs: added flag for 'print statement'.
562
563         * Statement.cs: 'If' class, resolves firstly the condition, the true_stm
564         and false_stm.
565
566         * driver.cs:  Init the semantic analysis phase.
567
568         * expression.cs: 'Unary' class, resolves its operand
569         first. 'Binary' class,resolves left and right first. 'Args' class
570         resolve all the formal parameters first. 'Expression' resolve all
571         the nested expressions first.
572
573         * jscript-lexer-parser.g: Replaced 'Literal' references for AST ones.
574         
575 2003-11-08 cesar lopez nataren <cesar@ciencias.unam.mx>
576
577         * jscript-lexer-parser.g: Allow the building of numeric_literal and DECIMAL_LITERAL,
578         this is temporal in order to get Factorial compiled by mjs (must
579         build the types according to Ecma-262 spec).
580
581         * Literal.cs: Added NumericLiteral class.
582
583 2003-11-06 cesar lopez nataren <cesar@ciencias.unam.mx>
584
585         * FunctionDeclaration.cs: Build a ScriptFunction local variable,
586         if inside a nested block.
587
588 2003-11-05 cesar lopez nataren <cesar@ciencias.unam.mx>
589
590         * jscript-lexer-parser.g: Now we take care of parents. This allows
591         to keep track if we are inside nested blocks. At
592         'func_decl_or_expr', now I built the FunctionDeclaration or
593         FunctionExpression first and then assign its body to it - this let
594         me get a non-null value of the FunctionExpression or
595         FunctionDeclaration so I can detect if it's a nested block (thanks go to Jackson!).
596
597         * Block.cs, FunctionObject.cs, VariableDeclaration.cs: Added 'AST parent' field.
598         * Block.cs, FunctionDeclaration.cs, FunctionExpression.cs,
599         FunctionObject.cs, VariableDeclaration.cs: Added 'AST parent' parameter to constructor.
600
601         * ScriptBlock.cs: Initiate the global block with 'null' as parent.
602         
603         * FunctionDeclaration.cs: Added 'get_composite_name ()' method
604         (gets the name of a function if it's nested). Emit code for
605         function's body. At 'Emit ()' now we take care if it's a nested
606         declaration.
607
608         * FunctionObject.cs: default return type is 'void' not
609         'Object'. Function declarations without parameters map to functions with
610         'Object this' and 'VsaEngine engine' as parameters by
611         default. Assign parent to nested block.
612
613         * VariableDeclaration.cs: At 'Emit ()', now we take care if we are
614         a global declaration or inside a function declaration.
615         
616 2003-11-04 cesar lopez nataren <cesar@ciencias.unam.mx>
617
618         * FunctionObject.cs: Handle no parameters on functions.
619         
620         * jscript-lexer-parser.g: Allow functions without parameters.
621
622 2003-11-03 cesar lopez nataren <cesar@ciencias.unam.mx>
623
624         * ASTList.cs, ArrayLiteral.cs, BitwiseBinary.cs, Blocks.cs,
625         DebugBreak.cs, Enum.cs, Equality.cs, Eval.cs, ForIn.cs,
626         FunctionDeclaration.cs, FunctionExpression.cs, Import.cs,
627         InstanceOf.cs, Literal.cs, NumericBinary.cs, NumericUnary.cs,
628         Package.cs, Plus.cs, PostOrPrefixOperator.cs, Print.cs,
629         Relational.cs, ScriptBlock.cs, StrictEquality.cs, Throw.cs,
630         Try.cs, TypeOf.cs, VariableDeclaration.cs, VariableStatement.cs,
631         With.cs, expression.cs : Added 
632         'Resolve' method stub.
633
634         * CodeGenerator.cs: Added a ILGenerator field to EmitContext.
635
636         * FormalParameterList.cs: Added FormalParam class. Change Add
637         method to receive the id and the type annotation from function's parameters.
638
639         * FunctionDeclaration.cs: Added code for initial function's
640         definition code generation.
641
642         * FunctionObject.cs: Added MethodAttributes and type_annot
643         fields. Added params_types function, which returns an array of
644         types from each of the function's parameters.
645
646         * IdentificationTable.cs: Added ToString method.
647
648         * SemanticAnalizer.cs: Fixed the file name (maybe I should erase it
649         and add it again with the correct name). Not based on the Visitor
650         pattern anymore. Deleted all the VisitFOO methods. Added a
651         IdentificationTable field. Added Run, Dump methods.
652
653         * Statement.cs: Deleted Statement class (it was being used for
654         nothing). All classes that were having Statement as parent,
655         changed their parent to be AST.
656
657         * SymbolTable.cs: Added Add method that receives the id and the
658         declaration class. Retrieve changed to return an AST. Added
659         ToString method. Added 'SymbolTable parent' field.
660
661         * VariableDeclaration.cs: Added InitValue property.
662
663         * ast.cs: Added some comments and abstract method 'Resolve'.
664
665         * jscript-lexer-parser.g: Added parsing support for formal
666         parameters type annotations.
667         
668 2003-10-30  cesar lopez nataren <cesar@ciencias.unam.mx>
669
670         * jscript-lexer-parser.g: fixed function call parsing! yeah! (give
671         thanks to Hector!) 
672
673 2003-10-28  cesar lopez nataren <cesar@ciencias.unam.mx>
674
675         * jscript-lexer-parser.g: allow empty program files. Added type
676         annotations on var decl and function decl.
677         * VariableDeclaration.cs: added return type annotation field.
678         * FunctionExpression.cs: added return type parameter to constructor.
679         * FunctionDeclaration.cs: added return type parameter to
680         constructor. Added Emit method (just creates the static field at
681         the global object, for now).
682         * FunctionObject.cs: added return type to constructor. Changed
683         names to readable ones ;-) 
684
685         * ScriptStream.cs: added WriteLine.
686
687 2003-10-24  cesar lopez nataren <cesar@ciencias.unam.mx>
688
689         * ast.cs: Added 'virtual' Emit method (I might change it to be
690         abstract, but I would have to added to all classes that derive
691         from it. I'll do it later)
692         * Block.cs: Added Emit method.
693         * CodeGnerator.cs: Restructured it (not based on the Visitor pattern
694         anymore) - still missing some methods, ut on the way. A nice
695         hacking weekend coming. Added EmitContext class.
696         * ScriptBlock.cs: Added Emit method.
697         * VariableDeclaration.cs: Changed type field from string to
698         Type. Added Emit method.
699         * VariableStatement.cs: Added Emit method.
700         * driver.cs: Added CodeGeneration phase (only simple var
701         declarations support it. More coming soon).
702
703
704 2003-10-22  cesar lopez nataren <cesar@ciencias.unam.mx>
705
706         * statement.cs: added Return class.
707
708         * Throw.cs: Added expression field, constructor and ToString.
709         
710         * jscript-lexer-parser.g: Allow return_stm and throw_stm tree
711         building.  
712         
713         * With.cs: added constructor and ToString. Back to the non-tmp
714         namespace.
715
716         * jscript-parser-lexer.g: allow with_stm tree building.
717
718         * jscript-lexer-parser.g: changed the return type from if_stm from
719         'If' to AST. Added tree for continue_stm. Allowed building of
720         Break tree.
721
722         * statement.cs: switched to internal 'If' class. Added Continue
723         class. Added Break class.
724         
725         * jscript-lexer-parser.g: build tree for function decl or expr.
726
727         * FunctionDeclaration.cs: added internal constructor.
728
729         * FunctionExpression.cs: added internal constructor.
730
731         * FunctionObject.cs: added internal constructor and ToString method.
732
733         * jscript-lexer-parser.g: added building tree for if_stm.
734         * Statement.cs: Added if class for 'if' statement.
735         
736
737 2003-10-21  cesar lopez nataren  <cesar@ciencias.unam.mx>
738
739         * VariableDeclaration.cs: added the initializer to ToString.
740         
741         * jscript-lexer-parser.g: Allow "christmas trees" (aka expression
742         trees) building.
743         
744         * Block.cs, Equality.cs, Relational.cs: modified ToString 
745
746         * Equality.cs, Relational.cs, StringLiteral.cs,
747         VariableDeclaration.cs: Added constructor 
748
749         * VariableStatement.cs, ScriptBlock.cs: changed from hungarian
750         name convetion style to mono style.
751
752         * UnaryOp.cs: added operator and operand fields.
753
754         * VariableDeclaration.cs: chenged field name from assignExp to val.
755
756         *  BinaryOp.cs: Made "internal" the attributes, added the two
757         operators holders.
758
759         * JScriptLexer.cs, JScriptParser.cs, JScriptParserokenTypes.cs,: updates from grammar changes.
760         
761         * driver.cs: Dump the string representation of the parsed exps.
762
763         * Literal.cs:  added BooleanLiteral
764
765         * Relational.cs: added constructor, ToString, 
766
767 2003-10-10  cesar lopez nataren <cesar@ciencias.unam.mx>
768
769         * README: added some info about hacking the grammar
770
771         * JSparser.cs: Updated the constructor to not receiving params.
772
773         * JScriptLexer.cs, JScriptParser.cs, JScriptParserTokenTypes.cs,
774         JScriptParserTokenTypes.txt: update of antlr generated files from
775         grammar changes. 
776
777         * jscript-lexer-parser.g: Rewrote the EcmaScript grammar. Now we
778         can parse a little bit more useful programs like:
779
780         function factorial (i)
781         {
782                 var k;
783
784                 if (i <= 0)
785                         return 1;
786                 else {
787                         k = factorial (i - 1);
788                         return i * k;
789                 }
790         }
791
792         var x;
793         x = factorial (4); 
794         print (x);
795
796         As you can see, it's not the classic factorial function
797         definition, I still have to make some tricks like storing the
798         result from the recursive call and then multiply. But this new
799         grammar it's easier to alter than the old one. Also we got support
800         for for-in statements, for statements, global expressions, support
801         for object accesors or better known as the "dot" operator. Two
802         rules are on the eye: left_hand_size_expr and call_expr, in order
803         to finish the parsing grammar and fix the bugs.
804
805
806 2003-09-29    <cesar@ciencias.unam.mx>
807
808         * Added: VsaGlobalItem.cs, VsaReferenceItem.cs, VsaCodeItem.cs
809
810         * Added VsaItem.cs, implements IVsaItem.
811
812 2003-09-28    <cesar@ciencias.unam.mx>
813
814         * VsaItems.cs: Check that no name is repeated (this was docs fault
815         :-)). This is the beauty of testing.
816
817         * Add VsaItems.cs, implements IVsaItems.
818
819 2003-09-22    <cesar@ciencias.unam.mx>
820
821         * DocumentContext.cs: changed constructor from internal to public,
822         this a kind of hack ;), but we can build mjs.exe with that change.
823
824         * driver.cs, ast.cs, VsaEngine.cs, VariableStatement.cs,
825         VariableDeclaration.cs, VBArrayConstructor.cs, StringObject.cs,
826         StringLiteral.cs, StringConstructor.cs, Statement.cs,
827         ScriptStream.cs, ScriptObject.cs, ScriptFunction.cs,
828         ScriptBlock.cs, RegExpObject.cs, RegExpConstructor.cs, Print.cs,
829         Package.cs, ObjectConstructor.cs, NumberObject.cs,
830         NumberConstructor.cs, MathObject.cs, Literal.cs,
831         LenientGlobalObject.cs, JSVariableField.cs, JSToken.cs,
832         JSScanner.cs, JSParser.cs, JSObject.cs, JSLocalField.cs,
833         JSFunctionAttributeEnum.cs, JSFunctionAttibute.cs, JSField.cs,
834         JSBuiltIn.cs, IVsaScriptScope.cs, IRedirectOutput.cs,
835         IActivationObject.cs, GlobalScope.cs, GlobalObject.cs,
836         FunctionObject.cs, FunctionExpression.cs, FunctionDeclaration.cs,
837         FunctionConstructor.cs, FormalParameterList.cs, ErrorObject.cs,
838         ErrorConstructor.cs, EnumeratorObject.cs,
839         EnumeratorConstructor.cs, Enum.cs, Empty.cs, DocumentContext.cs,
840         DateObject.cs, DateConstructor.cs, Context.cs, Closure.cs,
841         BooleanObject.cs, BooleanConstructor.cs, Block.cs, BinaryOp.cs,
842         BaseVsaEngine.cs, ArrayObject.cs, ArrayConstructor.cs,
843         ActiveXObjectConstructor.cs, ActivationObject.cs: 
844
845         indentation comformance to mono style. Returned to
846         Microsoft.JScript namespace name. Now we can build
847         Microsoft.JScript.dll on Linux/Windows, and build mjs.exe on
848         linux/Windows with our Microsoft.JScript.dll. To build mjs.exe:
849         $(CSC) /r:Microsoft.JScript.dll  driver.cs. Also changed my mind
850         about the namespace stuff, because I want people 
851         to contribute NUnit tests for Microsoft.JScript public API.
852                 
853         * jscript-lexer-parser.g: Now we are back to Microsoft.JScript namespace.
854
855 2003-09-21    <cesar@ciencias.unam.mx>
856
857         * jscript-lexer-parser.g: fixed typo and added SEMI_COLON to print_statement.
858
859 2003-09-20    <cesar@ciencias.unam.mx>
860
861         * jscript-lexer-parser.g: We are little bit closer to the spec on
862         StringLiteral definition.  
863
864         * jscript-lexer-parser.g: One line patch, the beauty of tests :-)
865
866         * jscript-lexer-parser.g: Build ast for FunctionExpression.
867
868         * JSObject.cs: we don't throw NotImplementedException anymore,
869         this let us use FunctionExpression to build the ast.
870
871         * FunctionExpression.cs: Added a FunctionObject as field, a
872         default constructor.
873
874         * FunctionObject.cs: Added default constructor.
875
876         * driver.cs: Deleted the Jsc class. We are not generating code
877         now. I'm moving to provide something like mcs's EmitContext
878         instead of the CodeGenerator class having the Reflection.Emit
879         builders and ILGenerator. This driver is just for Lexical and
880         Parsing phases testing.
881
882         * driver.cs: Now we are using the Microsoft.JScript public API
883         functions to load the lexer and parser.
884
885         * ScriptBlock.cs,Block.cs: Added ToString function.
886
887 2003-09-20    <cesar@ciencias.unam.mx>
888
889         * ASTList.cs, ArrayLiteral.cs, BitwiseBinary.cs, Block.cs,
890         DebugBreak.cs, Enum.cs, Equality.cs, Eval.cs, ForIn.cs,
891         FunctionExpression.cs, Import.cs, In.cs, InstanceOf.cs,
892         Literal.cs, NumericBinary.cs, NumericUnary.cs, Package.cs,
893         Plus.cs, PostOrPrefixOperator.cs, Print.cs, Relational.cs,
894         Statement.cs, StrictEquality.cs, StringLiteral.cs, Throw.cs,
895         Try.cs, TypeOf.cs, VariableDeclaration.cs, With.cs, ast.cs, 
896         : erased Visit method and made some mono indentation style changes.
897
898         * CodeGenerator.cs: commented some function calls.
899         * FunctionDeclaration.cs: moved function attributes to
900         FunctionObject class, erased Visit method.
901         * FunctionObject.cs: Here is where we store a function
902         expression/declaration info, erased Visit method.
903         * ScriptBlock.cs: Added a Block field, Block will contain the
904         source elements.
905         * jscript-lexer-parser.g: updated the grammar to build the program
906         representation based on ScriptBlock.
907
908 2003-09-19    <cesar@ciencias.unam.mx>
909
910         * JSToken.cs: public API compliance.
911
912 2003-09-07 Cesar Lopez Nataren  <cesar@ciencias.unam.mx>
913
914         * Context.cs: Added constructor and Document field.
915         * DocumentContext.cs: Added Name field.
916         * JSParser.cs: Integration of antlr's generated parser with
917         JSParser public API. ScriptBlock is now the principal data structure that
918         represents a Jscript .Net program.
919         * JSScanner.cs: Integration of antlr's generated lexer with
920         JSScanner public API.
921
922 2003-07-27  Cesar Lopez Nataren  <cesar@ciencias.unam.mx>
923         * Added files StringLiteral.cs, CodeGenerator.cs and Print.cs.
924
925 2003-07-27  Cesar Lopez Nataren  <cesar@ciencias.unam.mx>
926
927         * jscript-lexer-parser.g: Changed the namespace to
928         Microsoft.JScript.Tmp.
929
930         * jscript-lexer-parser.g: Fixwd a typo at source_elements rule.
931
932         * jscript-lexer-parser.g: Got the name of a
933         global_function_declaration and also its return type if
934         available. 
935
936         * jscript-lexer-parser.g: Added syntatic rule for print_statement.
937         * jscript-lexer-parser.g: Initial construction of AST for
938         enum_statement and package_statement.
939
940         * jscript-lexer-parser.g: Fixed the enum_statement to accept
941         empty enum declarations.
942
943         * jscript-lexer-parser.g: Got the type of a
944         veriable_declaration.
945
946         * jscript-lexer-parser.g: Initial construction of AST for
947         primary_expression (in particular literal).
948
949
950 2003-07-27  Cesar Lopez Nataren  <cesar@ciencias.unam.mx>
951
952         * driver.cs: Modified the driver structure to be compatible
953         with our new CodeGenrator and SemanticAnalizer. I
954         removed the builders from Reflection.Emit to the
955         CodeGenerator. Added an ASTList, SemanticAnalizer and
956         CodeGenerator here. Adde methods Run, GenerateCode
957
958
959 2003-07-27  Cesar Lopez Nataren  <cesar@ciencias.unam.mx>
960         * Statement.cs: Forgot to include it on last commit.
961
962 2003-07-27  Cesar Lopez Nataren  <cesar@ciencias.unam.mx>
963         
964         * Decided to change temporarly namespace name
965         Microsoft.JScript to Microsoft.JScript.Tmp in order to be able
966         to run the code generated by our CIL code generator (on  next
967         commit will come). The problem is that we don't have the
968         runtime support for our compiler, this involve VsaEngine class
969         and its "friends", which I have not found a lot of
970         doumentation for. If someone knows a docs place for them,
971         don't hesitate to send me a email pointing to them.
972
973         * Changed from public to internal Visit function at some
974         classes.
975
976         * Package.cs: Added Name and Members fields.
977         
978         * SemanticAnalizer.cs: Added methods VisitPrint and
979         VisitStringLiteral.
980
981         * VariableDeclaration.cs: Added Type field.
982
983         * Visitor.cs: Changed from public to internal. Added
984         VisitPrint and VisitStringLiteral methods.
985
986         * VsaEngine.cs: Fixed namespace name from Microsoft.JScript to
987         Microsoft.JScript.Vsa and then to Microsoft.JScript.Vsa.Tmp.
988         
989
990
991
992 2003-07-22  Cesar Lopez Nataren  <cesar@ciencias.unam.mx>
993
994         * Added CmdLineError.cs and JSError.cs, last night I forgot to
995         commit them.
996
997 2003-07-21 Cesar Lopez Nataren <cesar@ciencias.unam.mx>
998         * Added files:
999         ArrayPrototype.cs, ArrayWrapper.cs, BitwiseBinary.cs, 
1000         BlockScope.cs, BooleanPrototype.cs, BreakOutOfFinally.cs, 
1001         CmdLineException.cs, CmdLineOptionParser.cs, 
1002         ContinueOutOfFinally.cs, Convert.cs, DatePrototype.cs, 
1003         DocumentContext.cs, EnumeratorPrototype.cs, Equality.cs, 
1004         ErrorPrototype.cs, EvalErrorObject.cs, Expando.cs, 
1005         FieldAccessor.cs, FunctionPrototype.cs, FunctionWrapper.cs, 
1006         Globals.cs, In.cs, InstanceOf.cs, JSConstructor.cs, 
1007         JScriptException.cs, JSFieldInfo.cs, JSMethodInfo.cs, JSParser.cs, 
1008         JSPrototypeObject.cs, JSScanner.cs, LateBinding.cs, 
1009         LenientArrayPrototype.cs, LenientBooleanPrototype.cs, 
1010         LenientDateConstructor.cs, LenientDatePrototype.cs, 
1011         LenientEnumeratorPrototype.cs, LenientErrorPrototype.cs, 
1012         LenientFunctionPrototype.cs, LenientMathObject.cs, 
1013         LenientNumberPrototype.cs, LenientObjectPrototype.cs, 
1014         LenientRegExpPrototype.cs, LenientStringConstructor.cs, 
1015         LenientStringPrototype.cs, LenientVBArrayPrototype.cs, 
1016         MemberInfoList.cs, MethodInvoker.cs, Missing.cs, Namespace.cs, 
1017         NotRecommendedAttribute.cs, NumberPrototype.cs, NumericBinary.cs, 
1018         NumericUnary.cs, ObjectPrototype.cs, Plus.cs, 
1019         PostOrPrefixOperator.cs, RangeErrorObject.cs, 
1020         ReferenceAttribute.cs, ReferenceErrorObject.cs, RegExpMatch.cs, 
1021         RegExpPrototype.cs, Relational.cs, ResInfo.cs, 
1022         ReturnOutOfFinally.cs, ScriptStream.cs, SimpleHashtable.cs, 
1023         StackFrame.cs, StrictEquality.cs, StringPrototype.cs, 
1024         SuperTypeMembersSorter.cs, SyntaxErrorObject.cs, TypedArray.cs, 
1025         TypeErrorObject.cs, TypeOf.cs, TypeReflector.cs, 
1026         URIErrorObject.cs, VBArrayObject.cs, VBArrayPrototype.cs, 
1027         VersionableAttribute.cs 
1028
1029         Now, I must fill in the blanks :-)
1030
1031
1032 2003-07-09  Cesar Lopez Nataren  <cesar@ciencias.unam.mx>
1033         * jscript-lexer-parser.g: Added conditional_compilation_directive,
1034         which is the beginning of our support for conditional compilation
1035         statements and directives in our parser. Added
1036         cc_on_statement, and some lexer rules for getting the needed
1037         tokens (COND_SET, COND_DEBUG, COND_POSITION, COND_POSITION,
1038         COND_IF, COND_ELIF, COND_ELSE, COND_END and CC_ON.
1039
1040
1041 2003-07-03  Cesar Lopez Nataren  <cesar@ciencias.unam.mx>
1042
1043         * jscript-lexer-parser.g: Changed the format of copyright notice.
1044
1045         This changes will allow the support
1046         for the grammar added by MS to EcmaScript (aka its JScript .Net),
1047         I'm still missing some, but they are on the way.
1048
1049         * jscript-lexer-parser.g: Deleted function_declaration, and
1050         added global_function_declaration and type_function_declaration.
1051         I decided  to make the grammar as strict as the MS docs mark,
1052         but there's a difference between what their docs says and what
1053         their compiler does. For this case I decided to follow the
1054         docs. A program like: 
1055                 private function F () 
1056                 {}
1057         according to the docs, would not be syntaticly correct. But the MS
1058         compiler, accepts the grammar construct and mark the error at
1059         semantic analysis phase. I followed the docs this time. 
1060
1061         * jscript-lexer-parser.g: Added debbuger_statement.
1062         * jscript-lexer-parser.g: Added import_statement.
1063         * jscript-lexer-parser.g: Added package_statement and package_member(s).
1064         * jscript-lexer-parser.g: Added super_statement.
1065         * jscript-lexer-parser.g: Added const_statement.
1066         * jscript-lexer-parser.g: Added class_statement,
1067         interfaces_list and class_members. 
1068
1069         * jscript-lexer-parser.g: Added interface_statement and
1070         interface_members.
1071
1072         * jscript-lexer-parser.g: Added enum_statement.
1073         * jscript-lexer-parser.g: Added static_statement. The rule for
1074         this syntatic construc is: static identifier { [body] }
1075         body does not get well specified in the docs. Must search wich
1076         are the possible values of it.
1077
1078         * jscript-lexer-parser.g: At variable_declaration, added
1079         support for explicit type declaration.
1080
1081         * jscript-lexer-parser.g: Added numeric_literal,
1082         DECIMAL_LITERAL and HEX_INTEGER_LITERAL.
1083
1084         * jscript-lexer-parser.g: Added modifiers, modifier, version_modifier.
1085
1086
1087 2003-06-09  Cesar Lopez Nataren  <cesar@ciencias.unam.mx>
1088
1089
1090         * Added the Visit method to classes: AST, ArrayLiteral, ASTList,
1091         Block, DebugBreak, Eval, ForIn, FunctionDeclaration,
1092         FunctionExpression, Import, Package, ScriptBlock, Throw, Try,
1093         With, 
1094         
1095         That method will be the driver that will allow classes
1096         that implement the Visitor interface do a walk through the AST's
1097         elements, in particular the Semantic Analizer and the Code
1098         Generator. Every class that inherits from AST will have a Visit
1099         method, that method will receive a Visitor and a object as
1100         parameters, the only thing that it'll do is letting the Visitor
1101         call the respective method VisitX, where X is the name of the
1102         currently visited class.
1103         
1104         * ASTList.cs:Added constructor, Add, Visit, ToString  methods.
1105
1106         * FunctionDeclaration.cs: Added constructor, Visit and ToString
1107         methods.
1108         
1109         * jscript-lexer-parser.g: Added a ASTList as a parameter to the
1110         program (the main entry of the parser). Also added as parameters: 
1111                 - An AST to source_element.
1112                 - A Statement to statement.
1113                 - A VariableStatement to variable_statement.
1114                 - A VariableStatement to variable_declaration_list.
1115                 - A FormalParamerList by formal_parameter_list.
1116                 - A ASTList by function_body.
1117         
1118         And now some rules return objects:
1119                 - A VariableDeclaration by variable_declaration.
1120                 - A Functiondeclaration by function_declaration.
1121
1122         * driver.cs: Added the construction of the AST of the EcmaScript
1123         program.
1124
1125         * Visitor.cs: Added this file. It's the visitor interface. 
1126
1127         * VariableDeclaration.cs: Added this class, it's the AST
1128         representation of a variable declaration.
1129
1130         * Statement.cs: Added this file. It's the logical representation
1131         of a Statement.
1132
1133         * VariableStatement.cs: Added this class. It's the AST
1134         representation of a chain of variable declarations.
1135         
1136         * FormalParameterList.cs: The function declaration needs to store
1137         its parameter, we will put them on this class.
1138
1139         * SemanticAnalizer.cs: Added this class. I'll use the Visitor pattern in order to
1140         implement the semantic analysis and code generation
1141         phases. SemanticAnalizer and CodeGenerator will implement the
1142         Visitor interface, they will walk a program's
1143         AST tree and do their respective work.
1144
1145         * IdentificationTable.cs: Added this class. The SymbolTable will be used
1146         by the SemanticAnalyzer in order to keep track of the variable
1147         declaration encountered, etc..
1148
1149         * SymbolTable.cs: A simple hashtable but for commodity i'll call
1150         it this way.
1151
1152         
1153 2003-05-03  Cesar Lopez Nataren  <cesar@ciencias.unam.mx>
1154
1155         * jscript-lexer-parser.g:
1156         - Deleted the assignment_operator COMPOUND_ASSIGNMENT, and added
1157         MULTIPLICATION_ASSIGN, DIVISION_ASSIGN, REMAINDER_ASSIGN,
1158         ADDITION_ASSIGN, SUBSTRACTION_ASSIGN, SIGNED_LEFT_SHIFT_ASSIGN,
1159         SIGNED_RIGHT_SHIFT_ASSIGN, UNSIGNED_RIGHT_SHIFT_ASSIGN,
1160         BITWISE_AND_ASSIGN, BITWISE_OR_ASSIGN.
1161         - Changed INTERROGATION to CONDITIONAL.
1162         - Changed TRIANGLE to BITWISE_XOR.
1163         - Changed SLASH to DIVISION.
1164         - Changed PERCENT to REMAINDER.
1165         - Changed ADMIRATION to LOGICAL_NOT
1166         - Added BITWISE_NOT (~).
1167         - Added the INCREMENT and DECREMENT rules for
1168         left_hand_side_expression.
1169         - Increased lexer lookup from 2 to 4.
1170         - Redefined the definitions of: L_THAN, G_THAN, MINUS, TIMES,
1171         BITWISE_AND, BITWISE_OR,
1172         - Added operator: EQUALS, DOES_NOT_EQUALS, STRICT_EQUALS,
1173         REMAINDER, UNSIGNED_RIGHT_SHIFT.
1174         - Added the recursion rules for equality_expression.
1175         - Added the recursion rules for shift_expression.
1176         - Now we skip tabs.
1177         - The most important thing, added support for expressions like:
1178         sdf.[hgh], cool!
1179
1180 2003-04-20      Cesar Octavio Lopez Nataren <cesar@ciencias.unam.mx>
1181
1182         * driver.cs: 
1183         - Erased the Context class, it was used for the first
1184         test of the print_statement and Reflection.Emit. As I erased the
1185         Program, SourceElements, SourceElement from the ANTLR grammar (for
1186         the rework of the AST tied to the MS JScript public API), I erased
1187         some uses in here.
1188         - Erased the methods: EmitJScript0Type, EmitJScript0Cons,
1189         EmitGlobalCode, EmitJScript0, EmitJScriptMainType,
1190         EmitJScriptMainCons, EmitJScriptMainFunction, EmitJScriptMain,
1191         Emit.
1192
1193         * jscript-lexer-parser.g: 
1194         - Erased the references to the classes Program, SourceElements,
1195         SourceElement, Statement, FunctionDeclaration and erased
1196         print_statement rule. 
1197
1198         * JSCriptLexer.cs JScriptParser.cs and the other files generated
1199         by antlr, reflect changes from the grammar changes.
1200
1201 2003-04-19      Cesar Octavio Lopez Nataren <cesar@ciencias.unam.mx>
1202         * Added stubs for the classes:
1203         ASTList.cs 
1204         ActivationObject.cs 
1205         ActiveXObjectConstructor.cs 
1206         ArrayConstructor.cs 
1207         ArrayLiteral.cs 
1208         ArrayObject.cs 
1209         AssemblyCustomAttributeList.cs 
1210         BaseVsaEngine.cs 
1211         BinaryOp.cs 
1212         Binding.cs 
1213         Block.cs 
1214         BooleanConstructor.cs 
1215         BooleanObject.cs 
1216         Closure.cs 
1217         Context.cs 
1218         DateConstructor.cs 
1219         DateObject.cs 
1220         DebugBreak.cs 
1221         Empty.cs 
1222         EnumeratorConstructor.cs 
1223         EnumeratorObject.cs 
1224         ErrorConstructor.cs 
1225         ErrorObject.cs 
1226         Eval.cs 
1227         ForIn.cs 
1228         FunctionConstructor.cs 
1229         FunctionDeclaration.cs 
1230         FunctionExpression.cs 
1231         FunctionObject.cs 
1232         GlobalObject.cs 
1233         GlobalScope.cs 
1234         IActivationObject.cs 
1235         IRedirectOutput.cs 
1236         IVsaScriptScope.cs 
1237         Import.cs 
1238         JSBuiltIn.cs 
1239         JSField.cs 
1240         JSFunctionAttribute.cs 
1241         JSFunctionAttributeEnum.cs 
1242         JSLocalField.cs 
1243         JSObject.cs 
1244         JSToken.cs 
1245         JSVariableField.cs 
1246         LenientGlobalObject.cs 
1247         MathObject.cs 
1248         NumberConstructor.cs 
1249         NumberObject.cs 
1250         ObjectConstructor.cs 
1251         Package.cs 
1252         RegExpConstructor.cs 
1253         RegExpObject.cs 
1254         ScriptBlock.cs 
1255         ScriptFunction.cs 
1256         ScriptObject.cs 
1257         StringConstructor.cs 
1258         StringObject.cs 
1259         Throw.cs 
1260         Try.cs 
1261         UnaryOp.cs 
1262         VBArrayConstructor.cs 
1263         VsaEngine.cs 
1264         With.cs         
1265         
1266
1267 2003-04-11      Cesar Octavio Lopez Nataren <cesar@ciencias.unam.mx>
1268
1269         * jscript-lexer-parser.g:
1270         - Added rules for: continue_statement, break_statement,
1271         return_statement, throw statement (all of them do not ensure that
1272         no LineSeparator appears between the keyword on the left and the
1273         identifier, expression or semicolon on the right, that must be fixed).
1274         - Added single line comments rule.
1275
1276 2003-04-08      Cesar Octavio Lopez Nataren <cesar@ciencias.unam.mx>
1277
1278         * jscript-lexer-parser.g: Added syntatic rule for:
1279         - if_statement.
1280         - while and for-in subrules of iteration_statement.
1281         - Added array_literal - got tricky - I just could get the simplest rule going :)
1282         - Added elision.
1283
1284         
1285 2003-04-08      Cesar Octavio Lopez Nataren <cesar@ciencias.unam.mx>
1286
1287         * jscript-lexer-parser.g:
1288         - Syntatic rule for iteration_statement.
1289         - "do" subrule for it.
1290         - Added ((L_THAN | G_THAN | LE_THAN | GE_THAN | "instanceof" |
1291         "in") relational_expression | ) rule to relational_expression.
1292         -Added function_expression syntatic rule.
1293         - Added STRING_LITERAL to literal rules.
1294         - "Less/Greater or equal than" lexer rule.
1295
1296 2003-04-03      Cesar Octavio Lopez Nataren <cesar@ciencias.unam.mx>
1297
1298         * jscript-lexer-parser.g: Added switch_statement rule, case_block, case_clauses, case_clause, default_clause, labelled_statement, try_statement, catch_exp, finally_exp.
1299
1300 2003-04-01    Cesar Octavio Lopez Nataren <cesar@ciencias.unam.mx>
1301
1302         * jscript-lexer-parser.g: Added the grammar rules for: with_statement, object_literal, ( expression ), property_name_and_value_list, property_name and expression.
1303         
1304
1305 2003-03-30    Cesar Octavio Lopez Nataren <cesar@ciencias.unam.mx>
1306
1307         * Added a README file. Explains the dependencies and build process.
1308
1309 2003-03-30   Cesar Octavio Lopez Nataren <cesar@ciencias.unam.mx>
1310
1311         * Added this ChangeLog file.
1312         
1313         * ast.cs: Added this file. Contains the classes used for building
1314         the EcmaScript 's AST.
1315
1316         * JScript*: These are the files generated by antlr (the parser generator). 
1317
1318         * TODOAttribute.cs: Changed the namespace in order to use it freely on Microsoft.JScript.
1319
1320         * driver.cs: Added this file. Contains the compiler entry point. And some Reflection.Emit methods,
1321         that will be moved to other file in the future.
1322
1323         * jscript-lexer-parser.g: The EcmaScript's antlr grammar.