csdoc-patches Mailing List for C Sharp Document Generator (XML/HTML) (Page 5)
Status: Planning
Brought to you by:
mastergaurav
You can subscribe to this list here.
2003 |
Jan
|
Feb
(46) |
Mar
(17) |
Apr
(11) |
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(65) |
Nov
(17) |
Dec
|
From: Gaurav V. <mas...@us...> - 2003-03-28 12:07:54
|
Update of /cvsroot/csdoc/csdoc/src/tests In directory sc8-pr-cvs1:/tmp/cvs-serv7958 Modified Files: ChangeLog validTests Added Files: test_21.cs Log Message: 2003-03-28 * test_21.cs : Attributes. Nothing extra as such. --- NEW FILE --- using System; namespace MCSDoc.Tests { [AttributeUsage(AttributeTargets.All)] public class test_21Attribute : Attribute { private int x; public test_21Attribute(int x) { this.x = x; } public int X { get { return x; } } } [test_21(10)] public class test_21Class { public test_21Class() { } } } Index: ChangeLog =================================================================== RCS file: /cvsroot/csdoc/csdoc/src/tests/ChangeLog,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- ChangeLog 27 Mar 2003 17:46:40 -0000 1.15 +++ ChangeLog 28 Mar 2003 12:07:49 -0000 1.16 @@ -1,5 +1,9 @@ -2003-03-26 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> +2003-03-28 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> + + * test_21.cs : Attributes. Nothing extra as such. + +2003-03-27 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> * test_20.cs : A fun delegate test. Index: validTests =================================================================== RCS file: /cvsroot/csdoc/csdoc/src/tests/validTests,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- validTests 27 Mar 2003 17:46:41 -0000 1.6 +++ validTests 28 Mar 2003 12:07:50 -0000 1.7 @@ -1 +1,18 @@ -test.cs test_04.cs test_05.cs test_06.cs test_07.cs test_08.cs test_10.cs test_11.cs test_12.cs test_13.cs test_14.cs test_15.cs test_16.cs test_17.cs test_18.cs test_19.cs test_20.cs \ No newline at end of file +test.cs +test_04.cs +test_05.cs +test_06.cs +test_07.cs +test_08.cs +test_10.cs +test_11.cs +test_12.cs +test_13.cs +test_14.cs +test_15.cs +test_16.cs +test_17.cs +test_18.cs +test_19.cs +test_20.cs +test_21.cs \ No newline at end of file |
From: Gaurav V. <mas...@us...> - 2003-03-28 10:17:43
|
Update of /cvsroot/csdoc/csdoc/src/csdoc/MCSDoc In directory sc8-pr-cvs1:/tmp/cvs-serv15328 Modified Files: ChangeLog DocTreeGenerator.cs RootDoc.cs Log Message: 2003-03-28 * RootDoc.cs : Stubbed PopulateXXXX methods * DocTreeGenerator.cs : Looks like won't need it in future Index: ChangeLog =================================================================== RCS file: /cvsroot/csdoc/csdoc/src/csdoc/MCSDoc/ChangeLog,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- ChangeLog 27 Mar 2003 17:57:17 -0000 1.7 +++ ChangeLog 28 Mar 2003 10:17:40 -0000 1.8 @@ -1,4 +1,9 @@ +2003-03-28 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> + + * RootDoc.cs : Stubbed PopulateXXXX methods + * DocTreeGenerator.cs : Looks like won't need it in future + 2003-03-27 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> * RootDoc.cs : Initial implementation. Index: DocTreeGenerator.cs =================================================================== RCS file: /cvsroot/csdoc/csdoc/src/csdoc/MCSDoc/DocTreeGenerator.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- DocTreeGenerator.cs 27 Mar 2003 17:57:18 -0000 1.3 +++ DocTreeGenerator.cs 28 Mar 2003 10:17:40 -0000 1.4 @@ -15,21 +15,18 @@ internal class DocTreeGenerator { private TypeContainer root; - private IRootDoc rootDoc; + private RootDoc rootDoc; public DocTreeGenerator(TypeContainer root) { this.root = root; - rootDoc = new RootDoc(); + rootDoc = new RootDoc(root); CreateTree(); } private void CreateTree() { - /* go through each Types, Delegates, - * Enums, Interfaces - */ - throw new NotImplementedException(); + //rootDoc.Parse(root); } public IRootDoc RootDoc Index: RootDoc.cs =================================================================== RCS file: /cvsroot/csdoc/csdoc/src/csdoc/MCSDoc/RootDoc.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- RootDoc.cs 27 Mar 2003 17:57:18 -0000 1.3 +++ RootDoc.cs 28 Mar 2003 10:17:40 -0000 1.4 @@ -7,6 +7,7 @@ * */ +using System; using Mono.CSharp; namespace MCSDoc @@ -15,13 +16,40 @@ { INamespaceDoc[] namespaces; IClassDoc[] classes; + IStructDoc[] structs; IDelegateDoc[] delegates; IEnumDoc[] enums; IInterfaceDoc[] interfaces; - IStructDoc[] structs; - public RootDoc() + public RootDoc(TypeContainer root) + { + Parse(root); + } + + private void Parse(TypeContainer root) + { + throw new NotImplementedException(); + } + + private void PopulateContainers(ArrayList containers) + { + //classes and structs + throw new NotImplementedException(); + } + + private void PopulateEnums(ArrayList enums) + { + throw new NotImplementedException(); + } + + private void PopulateDelegates(ArrayList delegates) + { + throw new NotImplementedException(); + } + + private void PopulateInterfaces(ArrayList interfaces) { + throw new NotImplementedException(); } } } |
From: Gaurav V. <mas...@us...> - 2003-03-27 17:57:32
|
Update of /cvsroot/csdoc/csdoc/src/csdoc/MCSDoc In directory sc8-pr-cvs1:/tmp/cvs-serv14130 Modified Files: ChangeLog ClassDoc.cs DocTreeGenerator.cs IContainerDoc.cs IRootDoc.cs Added Files: RootDoc.cs Log Message: 2003-03-27 * RootDoc.cs : Initial implementation. * ClassDoc.cs : Initial implementation. * DocTreeGenerator.cs : Going ahead and back and ahead. * IContainerDoc.cs : IContainerDoc made property. * IRootDoc.cs : Namespaces is INamespace[] Index: ChangeLog =================================================================== RCS file: /cvsroot/csdoc/csdoc/src/csdoc/MCSDoc/ChangeLog,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- ChangeLog 22 Mar 2003 07:57:32 -0000 1.6 +++ ChangeLog 27 Mar 2003 17:57:17 -0000 1.7 @@ -1,4 +1,12 @@ +2003-03-27 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> + + * RootDoc.cs : Initial implementation. + * ClassDoc.cs : Initial implementation. + * DocTreeGenerator.cs : Going ahead and back and ahead. + * IContainerDoc.cs : IContainerDoc made property. + * IRootDoc.cs : Namespaces is INamespace[] + 2003-03-22 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> * DocTreeGenerator.cs : Stubbed RootDoc { get; } Index: ClassDoc.cs =================================================================== RCS file: /cvsroot/csdoc/csdoc/src/csdoc/MCSDoc/ClassDoc.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- ClassDoc.cs 22 Mar 2003 07:43:45 -0000 1.1 +++ ClassDoc.cs 27 Mar 2003 17:57:17 -0000 1.2 @@ -8,28 +8,45 @@ */ using System; +using System.Collections; using Mono.CSharp; namespace MCSDoc { - public interface ClassDoc : IClassDoc + public class ClassDoc : IClassDoc { private Class klass; private bool isException; private bool isAttribute; - private IClassDoc baseClass; - private IInterfaceDoc[] interfaces; + private IClassDoc baseClass = null; + private IInterfaceDoc[] interfaces = null; + private IContainerDoc container = null; public ClassDoc(Class klass) { this.klass = klass; - Parse(); + // need to Set - BaseClass, Interfaces, Container + throw new NotImplementedException(); } - + private void Parse() { - throw new NotImplementedException(); + /* + ArrayList bases = klass.Bases; + if(bases != null || bases.Count > 0) + { + // + } + */ + } + + public bool IsContained + { + get + { + return this.container != null; + } } public bool IsException @@ -61,6 +78,14 @@ get { return interfaces; + } + } + + public IContainerDoc Container + { + get + { + return this.container; } } } Index: DocTreeGenerator.cs =================================================================== RCS file: /cvsroot/csdoc/csdoc/src/csdoc/MCSDoc/DocTreeGenerator.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- DocTreeGenerator.cs 22 Mar 2003 07:57:32 -0000 1.2 +++ DocTreeGenerator.cs 27 Mar 2003 17:57:18 -0000 1.3 @@ -15,15 +15,20 @@ internal class DocTreeGenerator { private TypeContainer root; + private IRootDoc rootDoc; public DocTreeGenerator(TypeContainer root) { this.root = root; + rootDoc = new RootDoc(); CreateTree(); } private void CreateTree() { + /* go through each Types, Delegates, + * Enums, Interfaces + */ throw new NotImplementedException(); } @@ -31,7 +36,7 @@ { get { - throw new NotImplementedException(); + return rootDoc; } } } Index: IContainerDoc.cs =================================================================== RCS file: /cvsroot/csdoc/csdoc/src/csdoc/MCSDoc/IContainerDoc.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- IContainerDoc.cs 9 Mar 2003 15:17:29 -0000 1.1 +++ IContainerDoc.cs 27 Mar 2003 17:57:18 -0000 1.2 @@ -19,7 +19,7 @@ // Returns non null only if(IsContained) // may throw an exception otherwise - IContainerDoc GetContainerDoc(); + IContainerDoc ContainerDoc { get; } IAttributeDoc[] Attributes { get; } IMethodDoc[] Methods { get; } Index: IRootDoc.cs =================================================================== RCS file: /cvsroot/csdoc/csdoc/src/csdoc/MCSDoc/IRootDoc.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- IRootDoc.cs 9 Mar 2003 15:17:29 -0000 1.3 +++ IRootDoc.cs 27 Mar 2003 17:57:18 -0000 1.4 @@ -13,7 +13,7 @@ { public interface IRootDoc { - NamespaceDoc[] Namespaces { get; } + INamespaceDoc[] Namespaces { get; } IClassDoc[] Classes { get; } IDelegateDoc[] Delegates { get; } |
From: Gaurav V. <mas...@us...> - 2003-03-27 17:50:59
|
Update of /cvsroot/csdoc/csdoc/src/csdoc In directory sc8-pr-cvs1:/tmp/cvs-serv11438 Modified Files: cs-parser.jay cs-tokenizer.cs ChangeLog Log Message: 2003-03-27 * cs-parser.jay : Modified the attribute rule. Now collects documents after parsing attributes. * cs-tokenizer.cs : Hmmm... I was losing all docs. Index: cs-parser.jay =================================================================== RCS file: /cvsroot/csdoc/csdoc/src/csdoc/cs-parser.jay,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- cs-parser.jay 24 Feb 2003 08:33:50 -0000 1.6 +++ cs-parser.jay 27 Mar 2003 17:50:51 -0000 1.7 @@ -422,8 +422,8 @@ // opt_attributes - : /* empty */ { lexer.StopCollectngDocs(); } - | { lexer.StopCollectngDocs(); } attribute_sections { $$ = $2; } + : /* empty */ { lexer.StopCollectingDocs(); } + | attribute_sections { lexer.StopCollectingDocs(); $$ = $1; } ; attribute_sections @@ -651,7 +651,7 @@ current_container.Namespace = current_namespace; RootContext.Tree.RecordDecl (full_struct_name, new_struct); new_struct.Documentation = lexer.GetDocs(); - lexer.SaveDocument(); + //lexer.SaveDocument(); } opt_class_base struct_body @@ -717,7 +717,7 @@ (Attributes) $1, l); CheckDef (current_container.AddConstant (c), c.Name, l); c.Documentation = lexer.GetDocs(); - lexer.SaveDocument(); + //lexer.SaveDocument(); } } ; @@ -763,7 +763,7 @@ CheckDef (current_container.AddField (field), field.Name, l); field.Documentation = lexer.GetDocs(); - lexer.SaveDocument(); + //lexer.SaveDocument(); } } ; @@ -874,7 +874,7 @@ //System.Console.WriteLine("LexerLocation : " + lexer.Location.Row); //System.Console.WriteLine("MethodLocation: " + method.Location.Row); method.Documentation = lexer.GetDocs(); - lexer.SaveDocument(); + //lexer.SaveDocument(); current_local_parameters = (Parameters) $6; $$ = method; @@ -889,7 +889,7 @@ (Parameters) $6, (Attributes) $1, lexer.Location); method.Documentation = lexer.GetDocs(); - lexer.SaveDocument(); + //lexer.SaveDocument(); current_local_parameters = (Parameters) $6; $$ = method; } @@ -1008,7 +1008,7 @@ CheckDef (current_container.AddProperty (prop), prop.Name, loc); prop.Documentation = lexer.GetDocs(); - lexer.SaveDocument(); + //lexer.SaveDocument(); implicit_value_parameter_type = null; } ; @@ -1113,7 +1113,7 @@ new_interface.Namespace = current_namespace; RootContext.Tree.RecordDecl (full_interface_name, new_interface); new_interface.Documentation = lexer.GetDocs(); - lexer.SaveDocument(); + //lexer.SaveDocument(); } opt_interface_base interface_body opt_semicolon @@ -1211,7 +1211,7 @@ (Parameters) $6, (Attributes) $1, lexer.Location); im.Documentation = lexer.GetDocs(); $$ = im; - lexer.SaveDocument(); + //lexer.SaveDocument(); } | opt_attributes opt_new VOID IDENTIFIER OPEN_PARENS opt_formal_parameter_list CLOSE_PARENS @@ -1222,7 +1222,7 @@ (Attributes) $1, lexer.Location); im.Documentation = lexer.GetDocs(); $$ = im; - lexer.SaveDocument(); + //lexer.SaveDocument(); } ; @@ -1243,7 +1243,7 @@ lexer.Location); ip.Documentation = lexer.GetDocs(); $$ = ip; - lexer.SaveDocument(); + //lexer.SaveDocument(); } ; @@ -1263,7 +1263,7 @@ lexer.Location); ie.Documentation = lexer.GetDocs(); $$ = ie; - lexer.SaveDocument(); + //lexer.SaveDocument(); } ; @@ -1285,7 +1285,7 @@ (bool) $2, (Attributes) $1, lexer.Location); ii.Documentation = lexer.GetDocs(); $$ = ii; - lexer.SaveDocument(); + //lexer.SaveDocument(); } ; @@ -1300,7 +1300,7 @@ // Note again, checking is done in semantic analysis current_container.AddOperator (op); op.Documentation = lexer.GetDocs(); - lexer.SaveDocument(); + //lexer.SaveDocument(); current_local_parameters = null; } @@ -1476,7 +1476,7 @@ Constructor ctor = new Constructor ((string) $1, (Parameters) $3, (ConstructorInitializer) $6, l); ctor.Documentation = lexer.GetDocs(); $$ = ctor; - lexer.SaveDocument(); + //lexer.SaveDocument(); } ; @@ -1524,7 +1524,7 @@ d.Block = (Block) $6; CheckDef (current_container.AddMethod (d), d.Name, d.Location); d.Documentation = lexer.GetDocs(); - lexer.SaveDocument(); + //lexer.SaveDocument(); } } ; @@ -1543,7 +1543,7 @@ CheckDef (current_container.AddEvent (e), e.Name, e.Location); e.Documentation = lexer.GetDocs(); - lexer.SaveDocument(); + //lexer.SaveDocument(); } } | opt_attributes @@ -1575,7 +1575,7 @@ Event e = new Event ((Expression) $4, (string) $5, null, (int) $2, add_accessor, rem_accessor, (Attributes) $1, loc); e.Documentation = lexer.GetDocs(); - lexer.SaveDocument(); + //lexer.SaveDocument(); CheckDef (current_container.AddEvent (e), e.Name, loc); implicit_value_parameter_type = null; @@ -1675,7 +1675,7 @@ implicit_value_parameter_type = null; indexer_parameters = null; indexer.Documentation = lexer.GetDocs(); - lexer.SaveDocument(); + //lexer.SaveDocument(); } ; @@ -1733,7 +1733,7 @@ CheckDef (current_container.AddEnum (e), full_name, enum_location); RootContext.Tree.RecordDecl (full_name, e); e.Documentation = lexer.GetDocs(); - lexer.SaveDocument(); + //lexer.SaveDocument(); } ; @@ -1779,7 +1779,7 @@ VariableDeclaration vd = new VariableDeclaration ((string) $2, null, lexer.Location, (Attributes) $1); vd.Documentation = lexer.GetDocs(); $$ = vd; - lexer.SaveDocument(); + //lexer.SaveDocument(); } | opt_attributes IDENTIFIER { @@ -1790,7 +1790,7 @@ VariableDeclaration vd = new VariableDeclaration ((string) $2, $5, lexer.Location, (Attributes) $1); vd.Documentation = lexer.GetDocs(); $$ = vd; - lexer.SaveDocument(); + //lexer.SaveDocument(); } ; @@ -1811,7 +1811,7 @@ del.Namespace = current_namespace; CheckDef (current_container.AddDelegate (del), del.Name, l); del.Documentation = lexer.GetDocs(); - lexer.SaveDocument(); + //lexer.SaveDocument(); } | opt_attributes opt_modifiers @@ -1830,7 +1830,7 @@ del.Namespace = current_namespace; CheckDef (current_container.AddDelegate (del), del.Name, l); del.Documentation = lexer.GetDocs(); - lexer.SaveDocument(); + //lexer.SaveDocument(); } ; @@ -2656,7 +2656,7 @@ new_class = new Class (current_container, name, (int) $2, (Attributes) $1, lexer.Location); new_class.Documentation = lexer.GetDocs(); - lexer.SaveDocument(); + //lexer.SaveDocument(); current_container = new_class; current_container.Namespace = current_namespace; RootContext.Tree.RecordDecl (name, new_class); Index: cs-tokenizer.cs =================================================================== RCS file: /cvsroot/csdoc/csdoc/src/csdoc/cs-tokenizer.cs,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- cs-tokenizer.cs 24 Feb 2003 08:33:50 -0000 1.7 +++ cs-tokenizer.cs 27 Mar 2003 17:50:52 -0000 1.8 @@ -67,14 +67,16 @@ isCollectingDocs = true; } - public void StopCollectngDocs() + public void StopCollectingDocs() { isCollectingDocs = false; } public string GetDocs() { - return commentString; + string retVal = commentString; + SaveDocument(); + return retVal; } private static Hashtable TokenValueName @@ -1640,20 +1642,26 @@ } afterComment = peekChar(); if(afterComment == '\r' || afterComment=='\n') + { + //Console.WriteLine("Delimiting // comment. \n\"" + commentString + "\""); commentString = ""; + } any_token_seen |= tokens_seen; tokens_seen = false; continue; } else if (d == '*'){ - getChar (); + getChar(); if(isCollectingDocs) commentString += "/*"; - while ((d = getChar ()) != -1){ - if (d == '*' && peekChar () == '/'){ + while ((d = getChar()) != -1){ + if (d == '*' && peekChar() == '/'){ if(isCollectingDocs) + { + //Console.WriteLine("Stop of /**/ comment. \n\"" + commentString + "\""); commentString += "*/"; - getChar (); + } + getChar(); col++; break; } @@ -1666,9 +1674,14 @@ any_token_seen |= tokens_seen; tokens_seen = false; } + /* afterComment = peekChar(); if(afterComment == '\r' || afterComment=='\n') + { + Console.WriteLine("Delimiting /* comment. \n\"" + commentString + "\""); commentString = ""; + } + */ } continue; } Index: ChangeLog =================================================================== RCS file: /cvsroot/csdoc/csdoc/src/csdoc/ChangeLog,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- ChangeLog 25 Feb 2003 14:21:44 -0000 1.15 +++ ChangeLog 27 Mar 2003 17:50:53 -0000 1.16 @@ -1,4 +1,10 @@ +2003-03-27 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> + + * cs-parser.jay : Modified the attribute rule. + Now collects documents after parsing attributes. + * cs-tokenizer.cs : Hmmm... I was losing all docs. + 2003-02-25 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> * gen-il.cs, gen-treedump.cs : Removed. |
From: Gaurav V. <mas...@us...> - 2003-03-27 17:46:47
|
Update of /cvsroot/csdoc/csdoc/src/tests In directory sc8-pr-cvs1:/tmp/cvs-serv9525 Modified Files: ChangeLog validTests Added Files: test_20.cs Log Message: 2003-03-26 * test_20.cs : A fun delegate test. --- NEW FILE --- using System; /** * <summary>test_20</summary> */ namespace MCSDoc.Tests { /// <summary>MyDelegate</summary> public delegate void MyDelegate(object sender, EventArgs e); internal class test_20 { public delegate void MyDelegate1(object sender, EventArgs e); public delegate void MyDelegate2(object sender, EventArgs e); } } Index: ChangeLog =================================================================== RCS file: /cvsroot/csdoc/csdoc/src/tests/ChangeLog,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- ChangeLog 26 Mar 2003 14:50:42 -0000 1.14 +++ ChangeLog 27 Mar 2003 17:46:40 -0000 1.15 @@ -1,6 +1,10 @@ 2003-03-26 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> + * test_20.cs : A fun delegate test. + +2003-03-26 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> + * test_19.cs : Added test for attributes. * test_07.cs, test_14.cs : Corrected the comment. Index: validTests =================================================================== RCS file: /cvsroot/csdoc/csdoc/src/tests/validTests,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- validTests 26 Mar 2003 14:50:43 -0000 1.5 +++ validTests 27 Mar 2003 17:46:41 -0000 1.6 @@ -1 +1 @@ -test.cs test_04.cs test_05.cs test_06.cs test_07.cs test_08.cs test_10.cs test_11.cs test_12.cs test_13.cs test_14.cs test_15.cs test_16.cs test_17.cs test_18.cs test_19.cs \ No newline at end of file +test.cs test_04.cs test_05.cs test_06.cs test_07.cs test_08.cs test_10.cs test_11.cs test_12.cs test_13.cs test_14.cs test_15.cs test_16.cs test_17.cs test_18.cs test_19.cs test_20.cs \ No newline at end of file |
From: Gaurav V. <mas...@us...> - 2003-03-26 14:50:56
|
Update of /cvsroot/csdoc/csdoc/src/tests In directory sc8-pr-cvs1:/tmp/cvs-serv24743 Modified Files: ChangeLog test_07.cs test_13.cs validTests Added Files: test_19.cs Log Message: 2003-03-26 * test_19.cs : Added test for attributes. * test_07.cs, test_14.cs : Corrected the comment. --- NEW FILE --- using System; /** * <summary>Hello</summary> */ [AttributeUsage(AttributeTargets.All)] public class test_19 : Attribute { private int value; public test_19() { } public int Value { get { return value; } set { this.value = value; } } } Index: ChangeLog =================================================================== RCS file: /cvsroot/csdoc/csdoc/src/tests/ChangeLog,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- ChangeLog 9 Mar 2003 15:19:06 -0000 1.13 +++ ChangeLog 26 Mar 2003 14:50:42 -0000 1.14 @@ -1,4 +1,9 @@ +2003-03-26 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> + + * test_19.cs : Added test for attributes. + * test_07.cs, test_14.cs : Corrected the comment. + 2003-03-09 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> * test_17.cs : Namespace within namespace. Index: test_07.cs =================================================================== RCS file: /cvsroot/csdoc/csdoc/src/tests/test_07.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- test_07.cs 20 Feb 2003 14:30:26 -0000 1.1 +++ test_07.cs 26 Mar 2003 14:50:43 -0000 1.2 @@ -1,7 +1,7 @@ using System; /** - * <summary>test_06</summary> + * <summary>test_07</summary> */ public class test_07 { Index: test_13.cs =================================================================== RCS file: /cvsroot/csdoc/csdoc/src/tests/test_13.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- test_13.cs 25 Feb 2003 12:07:08 -0000 1.1 +++ test_13.cs 26 Mar 2003 14:50:43 -0000 1.2 @@ -1,6 +1,6 @@ using System; -/// <summary>test_12</summary> +/// <summary>test_13</summary> public class test_13 : test, test_12 { /// <summary>Returns M1</summary> Index: validTests =================================================================== RCS file: /cvsroot/csdoc/csdoc/src/tests/validTests,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- validTests 9 Mar 2003 15:19:06 -0000 1.4 +++ validTests 26 Mar 2003 14:50:43 -0000 1.5 @@ -1 +1 @@ -test.cs test_04.cs test_05.cs test_06.cs test_07.cs test_08.cs test_10.cs test_11.cs test_12.cs test_13.cs test_14.cs test_15.cs test_16.cs test_17.cs test_18.cs \ No newline at end of file +test.cs test_04.cs test_05.cs test_06.cs test_07.cs test_08.cs test_10.cs test_11.cs test_12.cs test_13.cs test_14.cs test_15.cs test_16.cs test_17.cs test_18.cs test_19.cs \ No newline at end of file |
From: Gaurav V. <mas...@us...> - 2003-03-22 07:57:35
|
Update of /cvsroot/csdoc/csdoc/src/csdoc/MCSDoc In directory sc8-pr-cvs1:/tmp/cvs-serv8515 Modified Files: ChangeLog DocTreeGenerator.cs Log Message: 2003-03-22 * DocTreeGenerator.cs : Stubbed RootDoc { get; } Index: ChangeLog =================================================================== RCS file: /cvsroot/csdoc/csdoc/src/csdoc/MCSDoc/ChangeLog,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- ChangeLog 22 Mar 2003 07:43:45 -0000 1.5 +++ ChangeLog 22 Mar 2003 07:57:32 -0000 1.6 @@ -1,6 +1,10 @@ 2003-03-22 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> + * DocTreeGenerator.cs : Stubbed RootDoc { get; } + +2003-03-22 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> + * IAttributeDoc.cs, * IInterfaceDoc.cs : Added interfaces * ClassDoc.cs : Initial implementation Index: DocTreeGenerator.cs =================================================================== RCS file: /cvsroot/csdoc/csdoc/src/csdoc/MCSDoc/DocTreeGenerator.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- DocTreeGenerator.cs 22 Mar 2003 07:43:45 -0000 1.1 +++ DocTreeGenerator.cs 22 Mar 2003 07:57:32 -0000 1.2 @@ -26,5 +26,13 @@ { throw new NotImplementedException(); } + + public IRootDoc RootDoc + { + get + { + throw new NotImplementedException(); + } + } } } |
From: Gaurav V. <mas...@us...> - 2003-03-22 07:43:48
|
Update of /cvsroot/csdoc/csdoc/src/csdoc/MCSDoc In directory sc8-pr-cvs1:/tmp/cvs-serv1419 Modified Files: ChangeLog IClassDoc.cs Added Files: ClassDoc.cs DocTreeGenerator.cs IAttributeDoc.cs IInterfaceDoc.cs Log Message: 2003-03-22 * IAttributeDoc.cs, * IInterfaceDoc.cs : Added interfaces * ClassDoc.cs : Initial implementation * DocTreeGenerator.cs : Initial implementation --- NEW FILE --- /** * Project: Master C# Document Generator * Contact: mas...@us... * Web: http://csdoc.sourceforge.net * * Copyright: (C) 2003, Gaurav Vaish * */ using System; using Mono.CSharp; namespace MCSDoc { public interface ClassDoc : IClassDoc { private Class klass; private bool isException; private bool isAttribute; private IClassDoc baseClass; private IInterfaceDoc[] interfaces; public ClassDoc(Class klass) { this.klass = klass; Parse(); } private void Parse() { throw new NotImplementedException(); } public bool IsException { get { return isException; } } public bool IsAttribute { get { return isAttribute; } } public IClassDoc BaseClass { get { return baseClass; } } public IInterfaceDoc[] Interfaces { get { return interfaces; } } } } --- NEW FILE --- /** * Project: Master C# Document Generator * Contact: mas...@us... * Web: http://csdoc.sourceforge.net * * Copyright: (C) 2003, Gaurav Vaish * */ using Mono.CSharp; using System; namespace MCSDoc { internal class DocTreeGenerator { private TypeContainer root; public DocTreeGenerator(TypeContainer root) { this.root = root; CreateTree(); } private void CreateTree() { throw new NotImplementedException(); } } } --- NEW FILE --- /** * Project: Master C# Document Generator * Contact: mas...@us... * Web: http://csdoc.sourceforge.net * * Copyright: (C) 2003, Gaurav Vaish * */ using Mono.CSharp; using System; namespace MCSDoc { public interface IAttributeDoc { string Comments { get; } AccessFlags Flags { get; } AttributeTargets Targets { get; } IAttributeDoc[] Attributes { get; } IMethodDoc[] Methods { get; } IPropertyDoc[] Properties { get; } IMemberDoc[] Members { get; } } } --- NEW FILE --- /** * Project: Master C# Document Generator * Contact: mas...@us... * Web: http://csdoc.sourceforge.net * * Copyright: (C) 2003, Gaurav Vaish * */ using Mono.CSharp; namespace MCSDoc { public interface IInterfaceDoc { string Comments { get; } AccessFlags Flags { get; } IAttributeDoc[] Attributes { get; } IMethodDoc[] Methods { get; } IPropertyDoc[] Properties { get; } IMemberDoc[] Members { get; } IInterfaceDoc[] BaseInterfaces { get; } } } Index: ChangeLog =================================================================== RCS file: /cvsroot/csdoc/csdoc/src/csdoc/MCSDoc/ChangeLog,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- ChangeLog 9 Mar 2003 15:17:29 -0000 1.4 +++ ChangeLog 22 Mar 2003 07:43:45 -0000 1.5 @@ -1,4 +1,11 @@ +2003-03-22 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> + + * IAttributeDoc.cs, + * IInterfaceDoc.cs : Added interfaces + * ClassDoc.cs : Initial implementation + * DocTreeGenerator.cs : Initial implementation + 2003-03-09 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> * IRootDoc.cs, Index: IClassDoc.cs =================================================================== RCS file: /cvsroot/csdoc/csdoc/src/csdoc/MCSDoc/IClassDoc.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- IClassDoc.cs 9 Mar 2003 15:17:29 -0000 1.2 +++ IClassDoc.cs 22 Mar 2003 07:43:45 -0000 1.3 @@ -20,7 +20,7 @@ /// Returns document element for the /// base class, if any. /// </summary> - IClassDoc[] BaseClass { get; } + IClassDoc BaseClass { get; } /// <summary> /// Returns document elements for the |
From: Gaurav V. <mas...@us...> - 2003-03-09 15:19:09
|
Update of /cvsroot/csdoc/csdoc/src/tests In directory sc8-pr-cvs1:/tmp/cvs-serv6401 Modified Files: ChangeLog validTests Added Files: test_17.cs test_18.cs Log Message: 2003-03-09 * test_17.cs : Namespace within namespace. * test_18.cs : Enum inside a class. --- NEW FILE --- using System; namespace MCSDoc.Tests { namespace SubTest { public struct test_17 { /// <summary> /// test_17.Inner1 class /// </summary> public class Inner1 { public class Inner2 { } } public string GetEmpty() { return String.Empty; } } } } --- NEW FILE --- using System; namespace CSDoc.Tests { public class test_18 { /// <summary> /// test_18.Inner1 enum /// </summary> enum Inner1 { Field1, Field2 } } } Index: ChangeLog =================================================================== RCS file: /cvsroot/csdoc/csdoc/src/tests/ChangeLog,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- ChangeLog 26 Feb 2003 10:10:18 -0000 1.12 +++ ChangeLog 9 Mar 2003 15:19:06 -0000 1.13 @@ -1,4 +1,9 @@ +2003-03-09 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> + + * test_17.cs : Namespace within namespace. + * test_18.cs : Enum inside a class. + 2003-02-26 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> * test_15.cs : Typo bug in documentation. Index: validTests =================================================================== RCS file: /cvsroot/csdoc/csdoc/src/tests/validTests,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- validTests 26 Feb 2003 10:10:19 -0000 1.3 +++ validTests 9 Mar 2003 15:19:06 -0000 1.4 @@ -1 +1 @@ -test.cs test_04.cs test_05.cs test_06.cs test_07.cs test_08.cs test_10.cs test_11.cs test_12.cs test_13.cs test_14.cs test_15.cs test_16.cs \ No newline at end of file +test.cs test_04.cs test_05.cs test_06.cs test_07.cs test_08.cs test_10.cs test_11.cs test_12.cs test_13.cs test_14.cs test_15.cs test_16.cs test_17.cs test_18.cs \ No newline at end of file |
From: Gaurav V. <mas...@us...> - 2003-03-09 15:17:33
|
Update of /cvsroot/csdoc/csdoc/src/csdoc/MCSDoc In directory sc8-pr-cvs1:/tmp/cvs-serv5817 Modified Files: ChangeLog IClassDoc.cs INamespaceDoc.cs IRootDoc.cs Added Files: IContainerDoc.cs IStructDoc.cs Log Message: 2003-03-09 * IRootDoc.cs, * IClassDoc.cs, * INamespaceDoc.cs : Don't use *List classes. * ClassDocList.cs : Will remove it later. * IContainerDoc.cs : Superinterfaces for IClassDoc, IStructDoc since both of them can hold all other types inside them. * IStructDoc.cs : Added interface. --- NEW FILE --- /** * Project: Master C# Document Generator * Contact: mas...@us... * Web: http://csdoc.sourceforge.net * * Copyright: (C) 2003, Gaurav Vaish * */ using Mono.CSharp; namespace MCSDoc { public interface IContainerDoc { string Comments { get; } AccessFlags Flags { get; } bool IsContained { get; } // Returns non null only if(IsContained) // may throw an exception otherwise IContainerDoc GetContainerDoc(); IAttributeDoc[] Attributes { get; } IMethodDoc[] Methods { get; } IPropertyDoc[] Properties { get; } IMemberDoc[] Members { get; } IClassDoc[] InnerClasses { get; } IDelegateDoc[] InnerDelegates { get; } IEnumDoc[] InnerEnums { get; } IInterfaceDoc[] InnerInterfaces { get; } IStructDoc[] InnerStructs { get; } } } --- NEW FILE --- /** * Project: Master C# Document Generator * Contact: mas...@us... * Web: http://csdoc.sourceforge.net * * Copyright: (C) 2003, Gaurav Vaish * */ using Mono.CSharp; namespace MCSDoc { public interface IStructDoc : IContainerDoc { } } Index: ChangeLog =================================================================== RCS file: /cvsroot/csdoc/csdoc/src/csdoc/MCSDoc/ChangeLog,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- ChangeLog 8 Mar 2003 10:59:29 -0000 1.3 +++ ChangeLog 9 Mar 2003 15:17:29 -0000 1.4 @@ -1,19 +1,30 @@ - -2003-03-08 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> - - * IRootDoc.cs, - * IClassDoc.cs, - * INamespaceDoc.cs, - * ClassDocList.cs : Trying to see what - works best. Still not sure of what classes - to have and what properties will they have. - -2003-02-25 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> - - * RootDoc.cs : Removed - * IRootDoc.cs : Added interface - * ClassDocList.cs : List of IClassDoc - -2003-02-25 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> - - * RootDoc.cs : Initial implementaion. + +2003-03-09 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> + + * IRootDoc.cs, + * IClassDoc.cs, + * INamespaceDoc.cs : Don't use *List classes. + * ClassDocList.cs : Will remove it later. + * IContainerDoc.cs : Superinterfaces for + IClassDoc, IStructDoc since both of them + can hold all other types inside them. + * IStructDoc.cs : Added interface. + +2003-03-08 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> + + * IRootDoc.cs, + * IClassDoc.cs, + * INamespaceDoc.cs, + * ClassDocList.cs : Trying to see what + works best. Still not sure of what classes + to have and what properties will they have. + +2003-02-25 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> + + * RootDoc.cs : Removed + * IRootDoc.cs : Added interface + * ClassDocList.cs : List of IClassDoc + +2003-02-25 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> + + * RootDoc.cs : Initial implementaion. Index: IClassDoc.cs =================================================================== RCS file: /cvsroot/csdoc/csdoc/src/csdoc/MCSDoc/IClassDoc.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- IClassDoc.cs 8 Mar 2003 10:59:30 -0000 1.1 +++ IClassDoc.cs 9 Mar 2003 15:17:29 -0000 1.2 @@ -8,27 +8,24 @@ */ using Mono.CSharp; -using System.Collections; -using System.Reflection; namespace MCSDoc { - public interface IClassDoc + public interface IClassDoc : IContainerDoc { - string Comments { get; } - AttributeDocList Attributes { get; } - MethodDocList Methods { get; } - PropertyDocList Properties { get; } - MemberDocList Members { get; } - bool IsException { get; } bool IsAttribute { get; } - bool IsInnerClass { get; } - - ClassDocList InnerClasses { get; } - StructDocList InnerStructs { get; } - ClassDocList BaseClass { get; } - ClassDocList Interfaces { get; } + /// <summary> + /// Returns document element for the + /// base class, if any. + /// </summary> + IClassDoc[] BaseClass { get; } + + /// <summary> + /// Returns document elements for the + /// implemented interfaces, if any. + /// </summary> + IInterfaceDoc[] Interfaces { get; } } } Index: INamespaceDoc.cs =================================================================== RCS file: /cvsroot/csdoc/csdoc/src/csdoc/MCSDoc/INamespaceDoc.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- INamespaceDoc.cs 8 Mar 2003 10:59:30 -0000 1.1 +++ INamespaceDoc.cs 9 Mar 2003 15:17:29 -0000 1.2 @@ -13,12 +13,13 @@ { public interface INamespaceDoc { - string Comments { get; } - AttributeDocList Attributes { get; } - ClassDocList Classes { get; } - DelegateDocList Delegates { get; } - EnumDocList Enums { get; } - InterfaceDocList Interfaces { get; } - StructDocList Structs { get; } + string Comments { get; } + + IAttributeDoc[] Attributes { get; } + IClassDoc[] Classes { get; } + IDelegateDoc[] Delegates { get; } + IEnumDoc[] Enums { get; } + IInterfaceDoc[] Interfaces { get; } + IStructDoc[] Structs { get; } } } Index: IRootDoc.cs =================================================================== RCS file: /cvsroot/csdoc/csdoc/src/csdoc/MCSDoc/IRootDoc.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- IRootDoc.cs 8 Mar 2003 10:59:30 -0000 1.2 +++ IRootDoc.cs 9 Mar 2003 15:17:29 -0000 1.3 @@ -13,11 +13,12 @@ { public interface IRootDoc { - NamespaceDocList Namespaces { get; } - ClassDocList Classes { get; } - DelegateDocList Delegates { get; } - EnumDocList Enums { get; } - InterfaceDocList Interfaces { get; } - StructDocList Structs { get; } + NamespaceDoc[] Namespaces { get; } + + IClassDoc[] Classes { get; } + IDelegateDoc[] Delegates { get; } + IEnumDoc[] Enums { get; } + IInterfaceDoc[] Interfaces { get; } + IStructDoc[] Structs { get; } } } |
From: Gaurav V. <mas...@us...> - 2003-03-08 10:59:34
|
Update of /cvsroot/csdoc/csdoc/src/csdoc/MCSDoc In directory sc8-pr-cvs1:/tmp/cvs-serv2758 Modified Files: ChangeLog ClassDocList.cs IRootDoc.cs Added Files: IClassDoc.cs INamespaceDoc.cs Log Message: 2003-03-08 * IRootDoc.cs, * IClassDoc.cs, * INamespaceDoc.cs, * ClassDocList.cs : Trying to see what works best. Still not sure of what classes to have and what properties will they have. --- NEW FILE --- /** * Project: Master C# Document Generator * Contact: mas...@us... * Web: http://csdoc.sourceforge.net * * Copyright: (C) 2003, Gaurav Vaish * */ using Mono.CSharp; using System.Collections; using System.Reflection; namespace MCSDoc { public interface IClassDoc { string Comments { get; } AttributeDocList Attributes { get; } MethodDocList Methods { get; } PropertyDocList Properties { get; } MemberDocList Members { get; } bool IsException { get; } bool IsAttribute { get; } bool IsInnerClass { get; } ClassDocList InnerClasses { get; } StructDocList InnerStructs { get; } ClassDocList BaseClass { get; } ClassDocList Interfaces { get; } } } --- NEW FILE --- /** * Project: Master C# Document Generator * Contact: mas...@us... * Web: http://csdoc.sourceforge.net * * Copyright: (C) 2003, Gaurav Vaish * */ using Mono.CSharp; namespace MCSDoc { public interface INamespaceDoc { string Comments { get; } AttributeDocList Attributes { get; } ClassDocList Classes { get; } DelegateDocList Delegates { get; } EnumDocList Enums { get; } InterfaceDocList Interfaces { get; } StructDocList Structs { get; } } } Index: ChangeLog =================================================================== RCS file: /cvsroot/csdoc/csdoc/src/csdoc/MCSDoc/ChangeLog,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- ChangeLog 25 Feb 2003 14:14:09 -0000 1.2 +++ ChangeLog 8 Mar 2003 10:59:29 -0000 1.3 @@ -1,4 +1,13 @@ +2003-03-08 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> + + * IRootDoc.cs, + * IClassDoc.cs, + * INamespaceDoc.cs, + * ClassDocList.cs : Trying to see what + works best. Still not sure of what classes + to have and what properties will they have. + 2003-02-25 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> * RootDoc.cs : Removed Index: ClassDocList.cs =================================================================== RCS file: /cvsroot/csdoc/csdoc/src/csdoc/MCSDoc/ClassDocList.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- ClassDocList.cs 25 Feb 2003 14:14:10 -0000 1.1 +++ ClassDocList.cs 8 Mar 2003 10:59:30 -0000 1.2 @@ -26,21 +26,25 @@ { foreach(object c in classDocs) { - if(c is ClassDoc) - Add((ClassDoc)c); + if(c is IClassDoc) + Add((IClassDoc)c); } } } - public ClassDoc this[int index] + public IClassDoc this[int index] { get { if(index >= 0 && index < classDocc.Count) { - return (ClassDoc)classDocs[index]; + return (IClassDoc)classDocs[index]; } } + set + { + classDocs[index] = value; + } } public int Count @@ -51,14 +55,19 @@ } } - public void Add(ClassDoc classDoc) + public void Add(IClassDoc classDoc) + { + classDocs.Add(classDoc); + } + + public bool Contains(IClassDoc classDoc) { - classes.Add(classDoc); + return classDocs.Contains(classDoc); } public Enumerator GetEnumerator() { - return classes.GetEnumerator(); + return classDocs.GetEnumerator(); } } } Index: IRootDoc.cs =================================================================== RCS file: /cvsroot/csdoc/csdoc/src/csdoc/MCSDoc/IRootDoc.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- IRootDoc.cs 25 Feb 2003 14:14:12 -0000 1.1 +++ IRootDoc.cs 8 Mar 2003 10:59:30 -0000 1.2 @@ -13,6 +13,7 @@ { public interface IRootDoc { + NamespaceDocList Namespaces { get; } ClassDocList Classes { get; } DelegateDocList Delegates { get; } EnumDocList Enums { get; } |
From: Gaurav V. <mas...@us...> - 2003-02-26 10:10:23
|
Update of /cvsroot/csdoc/csdoc/src/tests In directory sc8-pr-cvs1:/tmp/cvs-serv866 Modified Files: ChangeLog test_15.cs validTests Added Files: test_16.cs Log Message: 2003-02-26 * test_15.cs : Typo bug in documentation. * test_16.cs : Classes inside structs. --- NEW FILE --- using System; namespace CSDoc.Tests { public struct test_16 { /// <summary> /// test_16.Inner1 class /// </summary> public class Inner1 { public class Inner2 { } } public string GetEmpty() { return String.Empty; } } } Index: ChangeLog =================================================================== RCS file: /cvsroot/csdoc/csdoc/src/tests/ChangeLog,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- ChangeLog 26 Feb 2003 10:00:37 -0000 1.11 +++ ChangeLog 26 Feb 2003 10:10:18 -0000 1.12 @@ -1,6 +1,11 @@ 2003-02-26 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> + * test_15.cs : Typo bug in documentation. + * test_16.cs : Classes inside structs. + +2003-02-26 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> + * test_14.cs, * test_15.cs : Added new tests for inner classes. Index: test_15.cs =================================================================== RCS file: /cvsroot/csdoc/csdoc/src/tests/test_15.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- test_15.cs 26 Feb 2003 10:00:37 -0000 1.1 +++ test_15.cs 26 Feb 2003 10:10:18 -0000 1.2 @@ -5,7 +5,7 @@ public class test_15 { /// <summary> - /// test_14.Inner class + /// test_15.Inner1 class /// </summary> public class Inner1 { Index: validTests =================================================================== RCS file: /cvsroot/csdoc/csdoc/src/tests/validTests,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- validTests 26 Feb 2003 10:00:37 -0000 1.2 +++ validTests 26 Feb 2003 10:10:19 -0000 1.3 @@ -1 +1 @@ -test.cs test_04.cs test_05.cs test_06.cs test_07.cs test_08.cs test_10.cs test_11.cs test_12.cs test_13.cs test_14.cs test_15.cs \ No newline at end of file +test.cs test_04.cs test_05.cs test_06.cs test_07.cs test_08.cs test_10.cs test_11.cs test_12.cs test_13.cs test_14.cs test_15.cs test_16.cs \ No newline at end of file |
From: Gaurav V. <mas...@us...> - 2003-02-26 10:00:41
|
Update of /cvsroot/csdoc/csdoc/src/tests In directory sc8-pr-cvs1:/tmp/cvs-serv29900 Modified Files: ChangeLog validTests Added Files: test_14.cs test_15.cs Log Message: 2003-02-26 * test_14.cs, * test_15.cs : Added new tests for inner classes. --- NEW FILE --- using System; namespace CSDoc.Tests { public class test_14 { /// <summary> /// test_14.Inner class /// </summary> public class Inner { } public string GetEmpty() { return String.Empty; } } } --- NEW FILE --- using System; namespace CSDoc.Tests { public class test_15 { /// <summary> /// test_14.Inner class /// </summary> public class Inner1 { public class Inner2 { } } public string GetEmpty() { return String.Empty; } } } Index: ChangeLog =================================================================== RCS file: /cvsroot/csdoc/csdoc/src/tests/ChangeLog,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- ChangeLog 25 Feb 2003 13:25:46 -0000 1.10 +++ ChangeLog 26 Feb 2003 10:00:37 -0000 1.11 @@ -1,4 +1,9 @@ +2003-02-26 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> + + * test_14.cs, + * test_15.cs : Added new tests for inner classes. + 2003-02-25 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> * validTests : List of valid tests. Cause successful Index: validTests =================================================================== RCS file: /cvsroot/csdoc/csdoc/src/tests/validTests,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- validTests 25 Feb 2003 13:25:47 -0000 1.1 +++ validTests 26 Feb 2003 10:00:37 -0000 1.2 @@ -1 +1 @@ -test.cs test_04.cs test_05.cs test_06.cs test_07.cs test_08.cs test_10.cs test_11.cs test_12.cs test_13.cs \ No newline at end of file +test.cs test_04.cs test_05.cs test_06.cs test_07.cs test_08.cs test_10.cs test_11.cs test_12.cs test_13.cs test_14.cs test_15.cs \ No newline at end of file |
From: Gaurav V. <mas...@us...> - 2003-02-25 14:21:57
|
Update of /cvsroot/csdoc/csdoc/src/csdoc In directory sc8-pr-cvs1:/tmp/cvs-serv26389 Modified Files: ChangeLog Removed Files: gen-il.cs gen-treedump.cs Log Message: 2003-02-25 * gen-il.cs, gen-treedump.cs : Removed. Index: ChangeLog =================================================================== RCS file: /cvsroot/csdoc/csdoc/src/csdoc/ChangeLog,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- ChangeLog 25 Feb 2003 12:26:35 -0000 1.14 +++ ChangeLog 25 Feb 2003 14:21:44 -0000 1.15 @@ -1,6 +1,10 @@ 2003-02-25 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> + * gen-il.cs, gen-treedump.cs : Removed. + +2003-02-25 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> + * driver.cs : Revert back to one from mcs. Restart again! --- gen-il.cs DELETED --- --- gen-treedump.cs DELETED --- |
From: Gaurav V. <mas...@us...> - 2003-02-25 14:14:18
|
Update of /cvsroot/csdoc/csdoc/src/csdoc/MCSDoc In directory sc8-pr-cvs1:/tmp/cvs-serv22295 Modified Files: ChangeLog Added Files: ClassDocList.cs IRootDoc.cs Removed Files: RootDoc.cs Log Message: 2003-02-25 * RootDoc.cs : Removed * IRootDoc.cs : Added interface * ClassDocList.cs : List of IClassDoc --- NEW FILE --- /** * Project: Master C# Document Generator * Contact: mas...@us... * Web: http://csdoc.sourceforge.net * * Copyright: (C) 2003, Gaurav Vaish * */ using Mono.CSharp; using System.Collections; namespace MCSDoc { public class ClassDocList : IEnumerator { private ArrayList classDocs = new ArrayList(); public ClassDocList() { } public ClassDocList(ArrayList classDocs) { if(classDocs != null) { foreach(object c in classDocs) { if(c is ClassDoc) Add((ClassDoc)c); } } } public ClassDoc this[int index] { get { if(index >= 0 && index < classDocc.Count) { return (ClassDoc)classDocs[index]; } } } public int Count { get { return classDocs.Count; } } public void Add(ClassDoc classDoc) { classes.Add(classDoc); } public Enumerator GetEnumerator() { return classes.GetEnumerator(); } } } --- NEW FILE --- /** * Project: Master C# Document Generator * Contact: mas...@us... * Web: http://csdoc.sourceforge.net * * Copyright: (C) 2003, Gaurav Vaish * */ using Mono.CSharp; namespace MCSDoc { public interface IRootDoc { ClassDocList Classes { get; } DelegateDocList Delegates { get; } EnumDocList Enums { get; } InterfaceDocList Interfaces { get; } StructDocList Structs { get; } } } Index: ChangeLog =================================================================== RCS file: /cvsroot/csdoc/csdoc/src/csdoc/MCSDoc/ChangeLog,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- ChangeLog 25 Feb 2003 06:37:48 -0000 1.1 +++ ChangeLog 25 Feb 2003 14:14:09 -0000 1.2 @@ -1,4 +1,10 @@ 2003-02-25 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> + * RootDoc.cs : Removed + * IRootDoc.cs : Added interface + * ClassDocList.cs : List of IClassDoc + +2003-02-25 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> + * RootDoc.cs : Initial implementaion. --- RootDoc.cs DELETED --- |
From: Gaurav V. <mas...@us...> - 2003-02-25 13:25:54
|
Update of /cvsroot/csdoc/csdoc/src/tests In directory sc8-pr-cvs1:/tmp/cvs-serv368 Modified Files: ChangeLog Added Files: validTests Log Message: 2003-02-25 * validTests : List of valid tests. Cause successful compilation. --- NEW FILE --- test.cs test_04.cs test_05.cs test_06.cs test_07.cs test_08.cs test_10.cs test_11.cs test_12.cs test_13.cs Index: ChangeLog =================================================================== RCS file: /cvsroot/csdoc/csdoc/src/tests/ChangeLog,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- ChangeLog 25 Feb 2003 12:07:08 -0000 1.9 +++ ChangeLog 25 Feb 2003 13:25:46 -0000 1.10 @@ -1,6 +1,11 @@ 2003-02-25 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> + * validTests : List of valid tests. Cause successful + compilation. + +2003-02-25 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> + * test_13.cs : Added new test. 2003-02-25 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> |
From: Gaurav V. <mas...@us...> - 2003-02-25 12:26:42
|
Update of /cvsroot/csdoc/csdoc/src/csdoc In directory sc8-pr-cvs1:/tmp/cvs-serv7788 Modified Files: ChangeLog driver.cs Log Message: 2003-02-25 * driver.cs : Revert back to one from mcs. Restart again! Index: ChangeLog =================================================================== RCS file: /cvsroot/csdoc/csdoc/src/csdoc/ChangeLog,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- ChangeLog 25 Feb 2003 06:35:41 -0000 1.13 +++ ChangeLog 25 Feb 2003 12:26:35 -0000 1.14 @@ -1,6 +1,11 @@ 2003-02-25 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> + * driver.cs : Revert back to one from mcs. + Restart again! + +2003-02-25 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> + * driver.cs : Oh! I have to populate the items. * .cvsignore : Ignore only MCSDoc.exe * MCSDoc : Created new directory. Index: driver.cs =================================================================== RCS file: /cvsroot/csdoc/csdoc/src/csdoc/driver.cs,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- driver.cs 25 Feb 2003 06:35:41 -0000 1.7 +++ driver.cs 25 Feb 2003 12:26:35 -0000 1.8 @@ -28,17 +28,61 @@ public class Driver { + // + // Assemblies references to be linked. Initialized with + // mscorlib.dll here. + static ArrayList references; + + // + // If any of these fail, we ignore the problem. This is so + // that we can list all the assemblies in Windows and not fail + // if they are missing on Linux. + // + static ArrayList soft_references; + + // Lookup paths + static ArrayList link_paths; + + // Whether we want Yacc to output its progress + static bool yacc_verbose = false; + static string first_source; - static bool timestamps = false; - static bool pause = false; + + //static Target target = Target.Exe; + //static string target_ext = ".exe"; + + static bool want_debugging_support = false; + + //static bool parse_only = false; + //static bool timestamps = false; + //static bool pause = false; + + // + // Whether to load the initial config file (what CSC.RSP has by default) + // + static bool load_default_config = true; static Hashtable response_file_list; // + // A list of resource files + // + static ArrayList resources; + static ArrayList embedded_resources; + + // + // An array of the defines from the command line + // + static ArrayList defines; + + // // Output file // static string output_file = null; + // + // Last time we took the time + // static DateTime last_time, first_time; // @@ -51,17 +95,8 @@ // static bool using_default_encoder = true; - //static string xmlFileName = ""; - static ArrayList references = new ArrayList(); - static ArrayList soft_references = new ArrayList(); - static ArrayList link_paths = new ArrayList(); - static ArrayList defines; - - public static void ShowTime (string msg) + public static void ShowTime(string msg) { - if (!timestamps) - return; - DateTime now = DateTime.Now; TimeSpan span = now - last_time; last_time = now; @@ -69,16 +104,10 @@ Console.WriteLine ( "[{0:00}:{1:000}] {2}", (int) span.TotalSeconds, span.Milliseconds, msg); - - if (pause) - Console.ReadLine (); } - public static void ShowTotalTime (string msg) + public static void ShowTotalTime(string msg) { - if (!timestamps) - return; - DateTime now = DateTime.Now; TimeSpan span = now - first_time; last_time = now; @@ -89,27 +118,29 @@ } // MonoTODO("Change error code for aborted compilation to something reasonable")] - static void parse (SourceFile file) + static void parse(SourceFile file) { CSharpParser parser; Stream input; - try { - input = File.OpenRead (file.Name); - } catch { - Report.Error (2001, "Source file '" + file.Name + "' could not be opened"); + try + { + input = File.OpenRead(file.Name); + } catch + { + Report.Error(2001, "Source file '" + file.Name + "' could not be opened"); return; } - StreamReader reader = new StreamReader (input, encoding, using_default_encoder); + StreamReader reader = new StreamReader(input, encoding, using_default_encoder); - //parser = new CSharpParser (reader, file, defines); - parser = new CSharpParser(reader, file, null); - //parser.yacc_verbose = yacc_verbose; - parser.yacc_verbose = false; - try { - parser.parse (); - } catch (Exception ex) { + parser = new CSharpParser (reader, file, defines); + parser.yacc_verbose = yacc_verbose; + try + { + parser.parse(); + } catch(Exception ex) + { Report.Error(666, "Compilation aborted: " + ex); } finally { input.Close (); @@ -137,6 +168,10 @@ " --help Display command line options and exit\n" + " --about About the CSDoc Document Generator\n" + "\n" + + "Resources:\n" + + " --linkresource FILE[,ID] Links FILE as a resource\n" + + " --resource FILE[,ID] Embed FILE as a resource\n" + + "\n" + "Options can be of the form -option or /option" + /* options */ ""); } @@ -154,69 +189,156 @@ ""); } - public static int Main (string[] args) + public static int Main(string[] args) { - bool ok = MainDriver (args); + bool ok = MainDriver(args); - if (ok && Report.Errors == 0) { + if (ok && Report.Errors == 0) + { Console.Write("Compilation succeeded"); - if (Report.Warnings > 0) { + if(Report.Warnings > 0) + { Console.Write(" - {0} warning(s)", Report.Warnings); } Console.WriteLine(); return 0; - } else { + } else + { Console.WriteLine("Compilation failed: {0} error(s), {1} warnings", Report.Errors, Report.Warnings); return 1; } } - static string [] LoadArgs (string file) + static public void LoadAssembly(string assembly, bool soft) + { + Assembly a; + string total_log = ""; + + try + { + char[] path_chars = { '/', '\\', '.' }; + + if (assembly.IndexOfAny(path_chars) != -1) + { + a = Assembly.LoadFrom(assembly); + } else + { + a = Assembly.Load(assembly); + } + TypeManager.AddAssembly(a); + + } catch(FileNotFoundException) + { + foreach (string dir in link_paths) + { + string full_path = Path.Combine(dir, assembly); + if(!assembly.EndsWith(".dll")) + full_path += ".dll"; + + try + { + a = Assembly.LoadFrom(full_path); + TypeManager.AddAssembly(a); + return; + } catch (FileNotFoundException ff) + { + total_log += ff.FusionLog; + continue; + } + } + if(!soft) + { + Report.Error(6, "Cannot find assembly `" + assembly + "'" ); + Console.WriteLine("Log: \n" + total_log); + } + } catch(BadImageFormatException f) + { + Report.Error(6, "Cannot load assembly (bad file format)" + f.FusionLog); + } catch(FileLoadException f) + { + Report.Error(6, "Cannot load assembly " + f.FusionLog); + } catch(ArgumentNullException) + { + Report.Error(6, "Cannot load assembly (null argument)"); + } + } + + /// <summary> + /// Loads all assemblies referenced on the command line + /// </summary> + static public void LoadReferences() + { + foreach(string r in references) + LoadAssembly(r, false); + + foreach(string r in soft_references) + LoadAssembly(r, true); + + return; + } + + static void SetupDefaultDefines() + { + defines = new ArrayList (); + defines.Add("__MonoCS__"); + defines.Add("__MCSDoc__"); + } + + static string [] LoadArgs(string file) { StreamReader f; - ArrayList args = new ArrayList (); + ArrayList args = new ArrayList(); string line; - try { - f = new StreamReader (file); - } catch { + try + { + f = new StreamReader(file); + } catch + { return null; } StringBuilder sb = new StringBuilder (); - while ((line = f.ReadLine ()) != null){ + while((line = f.ReadLine()) != null) + { int t = line.Length; - for (int i = 0; i < t; i++){ + for (int i = 0; i < t; i++) + { char c = line [i]; - if (c == '"' || c == '\''){ + if (c == '"' || c == '\'') + { char end = c; - for (i++; i < t; i++){ + for(i++; i < t; i++) + { c = line [i]; if (c == end) break; sb.Append (c); } - } else if (c == ' '){ - if (sb.Length > 0){ + } else if (c == ' ') + { + if (sb.Length > 0) + { args.Add (sb.ToString ()); sb.Length = 0; } } else sb.Append (c); } - if (sb.Length > 0){ + if (sb.Length > 0) + { args.Add (sb.ToString ()); sb.Length = 0; } } - string [] ret_value = new string [args.Count]; - args.CopyTo (ret_value, 0); + string[] ret_value = new string[args.Count]; + args.CopyTo(ret_value, 0); return ret_value; } @@ -226,12 +348,14 @@ // static string GetSystemDir() { - Assembly [] assemblies = AppDomain.CurrentDomain.GetAssemblies (); + Assembly[] assemblies = AppDomain.CurrentDomain.GetAssemblies(); - foreach (Assembly a in assemblies){ + foreach (Assembly a in assemblies) + { string codebase = a.Location; - if (codebase.EndsWith ("corlib.dll")){ - return codebase.Substring (0, codebase.LastIndexOf (System.IO.Path.DirectorySeparatorChar)); + if(codebase.EndsWith ("corlib.dll")) + { + return codebase.Substring(0, codebase.LastIndexOf(System.IO.Path.DirectorySeparatorChar)); } } @@ -242,28 +366,31 @@ // // Given a path specification, splits the path from the file/pattern // - static void SplitPathAndPattern (string spec, out string path, out string pattern) + static void SplitPathAndPattern(string spec, out string path, out string pattern) { - int p = spec.LastIndexOf ("/"); + int p = spec.LastIndexOf("/"); if (p != -1){ // // Windows does not like /file.cs, switch that to: // "\", "file.cs" // - if (p == 0){ + if (p == 0) + { path = "\\"; - pattern = spec.Substring (1); - } else { - path = spec.Substring (0, p); - pattern = spec.Substring (p + 1); + pattern = spec.Substring(1); + } else + { + path = spec.Substring(0, p); + pattern = spec.Substring(p + 1); } return; } - p = spec.LastIndexOf ("\\"); - if (p != -1){ - path = spec.Substring (0, p); - pattern = spec.Substring (p + 1); + p = spec.LastIndexOf("\\"); + if (p != -1) + { + path = spec.Substring(0, p); + pattern = spec.Substring(p + 1); return; } @@ -271,74 +398,142 @@ pattern = spec; } - static void ProcessFile (string f) + static void ProcessFile(string f) { if (first_source == null) first_source = f; - Location.AddFile (f); + Location.AddFile(f); } - static void ProcessFiles () + static void ProcessFiles() { - Location.Initialize (); + Location.Initialize(); - foreach (SourceFile file in Location.SourceFiles) { - parse (file); + foreach(SourceFile file in Location.SourceFiles) + { + parse(file); } } - static void CompileFiles (string spec, bool recurse) + static void CompileFiles(string spec, bool recurse) { string path, pattern; - SplitPathAndPattern (spec, out path, out pattern); - if (pattern.IndexOf ("*") == -1){ - ProcessFile (spec); + + SplitPathAndPattern(spec, out path, out pattern); + if(pattern.IndexOf("*") == -1) + { + ProcessFile(spec); return; } - string [] files = null; - try { + string[] files = null; + try + { files = Directory.GetFiles (path, pattern); - } catch (System.IO.DirectoryNotFoundException) { + } catch (System.IO.DirectoryNotFoundException) + { Report.Error (2001, "Source file `" + spec + "' could not be found"); return; - } catch (System.IO.IOException){ + } catch (System.IO.IOException) + { Report.Error (2001, "Source file `" + spec + "' could not be found"); return; } - foreach (string f in files) { - ProcessFile (f); + + foreach(string f in files) + { + ProcessFile(f); } - if (!recurse) + if(!recurse) return; - string [] dirs = null; + string[] dirs = null; - try { + try + { dirs = Directory.GetDirectories (path); - } catch { - } - - foreach (string d in dirs) { + } catch { } + foreach(string d in dirs) + { // Don't include path in this string, as each // directory entry already does CompileFiles (d + "/" + pattern, true); } } - static void SetOutputFile (string name) + static void DefineDefaultConfig() + { + // + // For now the "default config" is harcoded into the compiler + // we can move this outside later + // + string[] default_config = + { + "System", + "System.Xml", +#if false + // + // Is it worth pre-loading all this stuff? + // + "Accessibility", + "System.Configuration.Install", + "System.Data", + "System.Design", + "System.DirectoryServices", + "System.Drawing.Design", + "System.Drawing", + "System.EnterpriseServices", + "System.Management", + "System.Messaging", + "System.Runtime.Remoting", + "System.Runtime.Serialization.Formatters.Soap", + "System.Security", + "System.ServiceProcess", + "System.Web", + "System.Web.RegularExpressions", + "System.Web.Services", + "System.Windows.Forms" +#endif + }; + + int p = 0; + foreach(string def in default_config) + soft_references.Insert(p++, def); + } + + static void SetOutputFile(string name) { output_file = name; } - static void Version () + static void SetWarningLevel(string s) { - string version = Assembly.GetExecutingAssembly ().GetName ().Version.ToString (); - Console.WriteLine ("C# Document Generator Version {0}", version); - Environment.Exit (0); + int level = 0; + + try + { + level = Int32.Parse(s); + } catch + { + Report.Error(1900, "--wlevel requires an value from 0 to 4"); + Environment.Exit(1); + } + if (level < 0 || level > 4) + { + Report.Error(1900, "Warning level must be 0 to 4"); + Environment.Exit(1); + } else + RootContext.WarningLevel = level; + } + + static void Version() + { + string version = Assembly.GetExecutingAssembly().GetName().Version.ToString(); + Console.WriteLine("C# Document Generator Version {0}", version); + Environment.Exit(0); } // @@ -346,18 +541,19 @@ // deprecated in favor of the CSCParseOption, which will also handle the // options that start with a dash in the future. // - static bool UnixParseOption (string arg, ref string [] args, ref int i) + static bool UnixParseOption(string arg, ref string [] args, ref int i) { - switch (arg){ + switch (arg) + { case "--version": - Version (); + Version(); return true; case "/?": case "/h": case "/help": case "--help": - Usage (); - Environment.Exit (0); + Usage(); + Environment.Exit(0); return true; case "--about": @@ -366,17 +562,42 @@ return true; case "--recurse": - if ((i + 1) >= args.Length){ - Report.Error (5, "--recurse requires an argument"); - Environment.Exit (1); + if ((i + 1) >= args.Length) + { + Report.Error(5, "--recurse requires an argument"); + Environment.Exit(1); } - CompileFiles (args [++i], true); + CompileFiles(args [++i], true); return true; - case "--timestamp": - timestamps = true; - last_time = first_time = DateTime.Now; + case "--linkresource": + case "--linkres": + if((i + 1) >= args.Length) + { + Usage(); + Report.Error(5, "Missing argument to --linkres"); + Environment.Exit(1); + } + if (resources == null) + resources = new ArrayList(); + + resources.Add(args[++i]); + return true; + + case "--resource": + case "--res": + if ((i + 1) >= args.Length) + { + Usage(); + Report.Error(5, "Missing argument to --resource"); + Environment.Exit(1); + } + if (embedded_resources == null) + embedded_resources = new ArrayList(); + + embedded_resources.Add(args[++i]); return true; + } return false; } @@ -385,21 +606,23 @@ // Currently it is very basic option parsing, but eventually, this will // be the complete option parser // - static bool CSCParseOption (string option, ref string [] args, ref int i) + static bool CSCParseOption(string option, ref string [] args, ref int i) { - int idx = option.IndexOf (":"); + int idx = option.IndexOf(":"); string arg, value; - if (idx == -1){ + if (idx == -1) + { arg = option; value = ""; - } else { + } else + { arg = option.Substring (0, idx); - value = option.Substring (idx + 1); } - switch (arg){ + switch(arg) + { case "/nologo": return true; @@ -416,105 +639,37 @@ Usage (); Environment.Exit (0); return true; - } - return false; - } - static void SetupDefaultDefines() - { - defines = new ArrayList(); - defines.Add("__MonoCS__"); - defines.Add("__MCSDoc__"); - } - - public static void LoadReferences() - { - foreach(string r in references) - LoadAssembly(r, false); - foreach(string s in soft_references) - LoadAssembly(s, true); - } - - static void LoadAssembly(string assembly, bool isSoft) - { - Assembly a; - string total_log = ""; - - try - { - char[] path_chars = { '/', '\\', '.' }; - if(assembly.IndexOfAny(path_chars) != -1) + case "/linkresource": + case "/linkres": + if ((i + 1) >= args.Length) { - a = Assembly.LoadFrom(assembly); - } else - { - a = Assembly.Load(assembly); + Usage(); + Report.Error(5, "Missing argument to --linkres"); + Environment.Exit(1); } - TypeManager.AddAssembly(a); - } catch(FileNotFoundException) - { - foreach(string dir in link_paths) - { - string full_path = Path.Combine(dir, assembly); - if (!assembly.EndsWith(".dll")) - full_path += ".dll"; + if (resources == null) + resources = new ArrayList(); - try - { - a = Assembly.LoadFrom(full_path); - TypeManager.AddAssembly(a); - return; - } catch (FileNotFoundException ff) - { - total_log += ff.FusionLog; - continue; - } - } - if(!isSoft) + resources.Add(args[++i]); + return true; + + case "/resource": + case "/res": + if ((i + 1) >= args.Length) { - Report.Error(6, "Cannot find assembly `" + assembly + "'" ); - Console.WriteLine("Log: \n" + total_log); + Usage(); + Report.Error(5, "Missing argument to --resource"); + Environment.Exit(1); } - } catch(BadImageFormatException f) - { - Report.Error(6, "Cannot load assembly (bad file format)" + f.FusionLog); - } catch(FileLoadException f) - { - Report.Error(6, "Cannot load assembly " + f.FusionLog); - } catch(ArgumentNullException) - { - Report.Error(6, "Cannot load assembly (null argument)"); - } - } + if (embedded_resources == null) + embedded_resources = new ArrayList(); - static void DefineDefaultConfig() - { - string [] default_config = { - "System", - "System.Xml", - "Accessibility", - "System.Configuration.Install", - "System.Data", - "System.Design", - "System.DirectoryServices", - "System.Drawing.Design", - "System.Drawing", - "System.EnterpriseServices", - "System.Management", - "System.Messaging", - "System.Runtime.Remoting", - "System.Runtime.Serialization.Formatters.Soap", - "System.Security", - "System.ServiceProcess", - "System.Web", - "System.Web.RegularExpressions", - "System.Web.Services", - "System.Windows.Forms" - }; - - int p = 0; - foreach (string def in default_config) - soft_references.Insert (p++, def); + embedded_resources.Add(args[++i]); + return true; + + } + return false; } /// <summary> @@ -532,17 +687,31 @@ int i; bool parsing_options = true; - try { + try + { encoding = Encoding.GetEncoding (28591); - } catch { + } catch + { Console.WriteLine ("Error: could not load encoding 28591, trying 1252"); encoding = Encoding.GetEncoding (1252); } + references = new ArrayList(); + soft_references = new ArrayList(); + link_paths = new ArrayList(); + SetupDefaultDefines(); + // + // Setup defaults + // + // This is not required because Assembly.Load knows about this + // path. + // + int argc = args.Length; - for (i = 0; i < argc; i++){ + for (i = 0; i < argc; i++) + { string arg = args [i]; if (arg.StartsWith ("@")){ @@ -598,103 +767,226 @@ } } - CompileFiles (arg, false); + CompileFiles(arg, false); } - ProcessFiles (); + ProcessFiles(); if (first_source == null){ Report.Error (2008, "No files to compile were specified"); return false; } - if(Report.Errors > 0) + if (Report.Errors > 0) return false; - if(RootContext.StdLib) - { - references.Insert(0, "mscorlib"); - } - - DefineDefaultConfig(); - - if(Report.Errors > 0) + // + // Load Core Library for default compilation + // + if (RootContext.StdLib) + references.Insert (0, "mscorlib"); + + if (load_default_config) + DefineDefaultConfig (); + + if (Report.Errors > 0){ return false; + } + + // + // Load assemblies required + // + first_time = last_time = DateTime.Now; + + ShowTime ("Loading references"); link_paths.Add(GetSystemDir()); LoadReferences(); - - if(Report.Errors > 0) + + ShowTime(" References loaded"); + + if (Report.Errors > 0){ return false; - - if(!RootContext.StdLib) + } + + // + // Quick hack + // + // Unfortunately, I'll need to keep this. :-(( + output_file = "MCSDoc.dll"; + //*/ + + CodeGen.Init(output_file, output_file, want_debugging_support); + + TypeManager.AddModule(CodeGen.ModuleBuilder); + +#if false + DateTime start = DateTime.Now; + TypeManager.GetAssemblyNamespaces (output_file); + DateTime end = DateTime.Now; + //Console.WriteLine ("Loading namespaces: " + (end - start)); + start = DateTime.Now; + //TypeManager.GetAllTypes (); + end = DateTime.Now; + //Console.WriteLine ("Getting Types: " + (end - start)); +#endif + + // + // Before emitting, we need to get the core + // types emitted from the user defined types + // or from the system ones. + // + ShowTime("Initializing Core Types"); + + if (!RootContext.StdLib) { RootContext.ResolveCore(); if(Report.Errors > 0) return false; } - - //TypeManager.InitCoreTypes(); - //RootContext.ResolveTree(); - if(!RootContext.StdLib) - RootContext.BootCorlib_PopulateCoreTypes(); - RootContext.PopulateTypes (); - RootContext.DefineTypes (); + TypeManager.InitCoreTypes(); - if(Report.Errors > 0) - return false; + ShowTime(" Core Types done"); + + // + // The second pass of the compiler + // + ShowTime("Resolving tree"); - TypeContainer tc = RootContext.Tree.Types; - ArrayList tree = tc.Types; - foreach(object current in tree) + RootContext.ResolveTree(); + + ShowTime("Populate tree"); + + if (!RootContext.StdLib) + RootContext.BootCorlib_PopulateCoreTypes (); + RootContext.PopulateTypes(); + RootContext.DefineTypes(); + + TypeManager.InitCodeHelpers (); + + if (Report.Errors > 0) { - string dispName = ""; - string baseNames = ""; - if(current is Class) - { - baseNames = DisplayClass((Class)current); - dispName = ((Class)current).Name + baseNames; + System.Console.WriteLine("Exiting after initializing code helpers..."); + return false; + } + + // + // The code generator + // + // Now, I don't need the rest of the stuff. +#if false + if (timestamps) + ShowTime ("Emitting code"); + ShowTotalTime ("Total so far"); + RootContext.EmitCode(); + if (timestamps) + ShowTime (" done"); + + if (Report.Errors > 0){ + return false; + } + + if (timestamps) + ShowTime ("Closing types"); + + if (RootContext.WarningLevel >= 4) + if (!Namespace.VerifyUsing ()) + return false; + + RootContext.CloseTypes (); + + PEFileKinds k = PEFileKinds.ConsoleApplication; + + if (target == Target.Library || target == Target.Module) + k = PEFileKinds.Dll; + else if (target == Target.Exe) + k = PEFileKinds.ConsoleApplication; + else if (target == Target.WinExe) + k = PEFileKinds.WindowApplication; + + if (target == Target.Exe || target == Target.WinExe){ + MethodInfo ep = RootContext.EntryPoint; + + if (ep == null){ + if (Report.Errors == 0) + Report.Error (5001, "Program " + output_file + + " does not have an entry point defined"); + return false; } - else if(current is Struct) - dispName = ((Struct)current).Name; - Console.WriteLine("<type>: " + current.GetType().ToString() + "->" + dispName); + + CodeGen.AssemblyBuilder.SetEntryPoint (ep, k); } - Console.WriteLine("\n-----Finished with structs and classes-----\n"); - if(tc.Interfaces != null) - foreach(Interface interf in tc.Interfaces) - { - Console.WriteLine("<type>: " + interf.GetType().ToString() + "->" + interf.Name); + + // + // Add the resources + // + if (resources != null){ + foreach (string spec in resources){ + string file, res; + int cp; + + cp = spec.IndexOf (','); + if (cp != -1){ + file = spec.Substring (0, cp); + res = spec.Substring (cp + 1); + } else + file = res = spec; + + CodeGen.AssemblyBuilder.AddResourceFile (res, file); } - Console.WriteLine("\n-----Finished with inteface -----\n"); - if(tc.Enums != null) - foreach(Mono.CSharp.Enum e in tc.Enums) - { - Console.WriteLine("<type>: " + e.GetType().ToString() + "->" + e.Name); + } + + if (embedded_resources != null){ + object[] margs = new object [2]; + Type[] argst = new Type [2]; + argst [0] = argst [1] = typeof (string); + MethodInfo embed_res = typeof (AssemblyBuilder).GetMethod ("EmbedResourceFile", argst); + if (embed_res == null) { + Report.Warning (0, new Location (-1), "Cannot embed resources on this runtime: try the Mono runtime instead."); + } else { + foreach (string spec in embedded_resources) { + int cp; + + cp = spec.IndexOf (','); + if (cp != -1){ + margs [0] = spec.Substring (cp + 1); + margs [1] = spec.Substring (0, cp); + } else + margs [0] = margs [1] = spec; + + if (File.Exists ((string) margs [1])) + embed_res.Invoke (CodeGen.AssemblyBuilder, margs); + else { + Report.Error (1566, "Can not find the resource " + margs [1]); + } + } } + } - return (Report.Errors == 0); - } + if (Report.Errors > 0) + return false; - static string DisplayClass(Class klass) - { - string retVal = ": "; - ArrayList b = klass.Bases; - if(b == null || b.Count == 0) - { - Console.WriteLine("------- No Bases -------"); - return String.Empty; + CodeGen.Save (output_file); + if (timestamps) { + ShowTime ("Saved output"); + ShowTotalTime ("Total"); } - foreach(object tc in b) - { - //if(tc is Class) - // retVal += (((Class)tc).Name + ", "); - //else if(tc is Interface) - // retVal += (((Interface)tc).Name + ", "); - //else - retVal += (tc.ToString() + ", "); + + Timer.ShowTimers (); + + if (Report.ExpectedError != 0){ + Console.WriteLine("Failed to report expected error " + Report.ExpectedError); + Environment.Exit (1); + return false; } - return retVal.Substring(0, retVal.Length - 2); +#endif +#if DEBUGME + Console.WriteLine ("Size of strings held: " + DeclSpace.length); + Console.WriteLine ("Size of strings short: " + DeclSpace.small); +#endif + return (Report.Errors == 0); } + } } |
From: Gaurav V. <mas...@us...> - 2003-02-25 12:07:11
|
Update of /cvsroot/csdoc/csdoc/src/tests In directory sc8-pr-cvs1:/tmp/cvs-serv32607 Modified Files: ChangeLog Added Files: test_13.cs Log Message: 2003-02-25 * test_13.cs : Added new test. --- NEW FILE --- using System; /// <summary>test_12</summary> public class test_13 : test, test_12 { /// <summary>Returns M1</summary> int test_12.GetM1() { return 0; } /// <summary>Gets or Sets P1</summary> int test_12.P1 { get { return -1; } set { } } } Index: ChangeLog =================================================================== RCS file: /cvsroot/csdoc/csdoc/src/tests/ChangeLog,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- ChangeLog 25 Feb 2003 05:07:33 -0000 1.8 +++ ChangeLog 25 Feb 2003 12:07:08 -0000 1.9 @@ -1,6 +1,10 @@ 2003-02-25 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> + * test_13.cs : Added new test. + +2003-02-25 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> + * test_12.cs : Added new test. 2003-02-21 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> |
From: Gaurav V. <mas...@us...> - 2003-02-25 06:37:50
|
Update of /cvsroot/csdoc/csdoc/src/csdoc/MCSDoc In directory sc8-pr-cvs1:/tmp/cvs-serv22003 Added Files: ChangeLog RootDoc.cs Log Message: 2003-02-25 * RootDoc.cs : Initial implementaion. --- NEW FILE --- 2003-02-25 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> * RootDoc.cs : Initial implementaion. --- NEW FILE --- /** * Project: Master C# Document Generator * Contact: mas...@us... * Web: http://csdoc.sourceforge.net * * Copyright: (C) 2003, Gaurav Vaish * */ using Mono.CSharp; namespace MCSDoc { public interface RootDoc { ClassList Classes { get; } DelegateList Delegates { get; } } } |
From: Gaurav V. <mas...@us...> - 2003-02-25 06:35:44
|
Update of /cvsroot/csdoc/csdoc/src/csdoc In directory sc8-pr-cvs1:/tmp/cvs-serv21355 Modified Files: .cvsignore ChangeLog driver.cs Log Message: 2003-02-25 * driver.cs : Oh! I have to populate the items. * .cvsignore : Ignore only MCSDoc.exe * MCSDoc : Created new directory. Index: .cvsignore =================================================================== RCS file: /cvsroot/csdoc/csdoc/src/csdoc/.cvsignore,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- .cvsignore 25 Feb 2003 05:10:46 -0000 1.3 +++ .cvsignore 25 Feb 2003 06:35:41 -0000 1.4 @@ -10,4 +10,4 @@ cs-parser.cs y.output *.pdb -mcsdoc \ No newline at end of file +mcsdoc.exe \ No newline at end of file Index: ChangeLog =================================================================== RCS file: /cvsroot/csdoc/csdoc/src/csdoc/ChangeLog,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- ChangeLog 25 Feb 2003 05:10:46 -0000 1.12 +++ ChangeLog 25 Feb 2003 06:35:41 -0000 1.13 @@ -1,6 +1,12 @@ 2003-02-25 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> + * driver.cs : Oh! I have to populate the items. + * .cvsignore : Ignore only MCSDoc.exe + * MCSDoc : Created new directory. + +2003-02-25 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> + * .cvsignore : Ignore also xml, diff 2003-02-24 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> Index: driver.cs =================================================================== RCS file: /cvsroot/csdoc/csdoc/src/csdoc/driver.cs,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- driver.cs 21 Feb 2003 11:29:56 -0000 1.6 +++ driver.cs 25 Feb 2003 06:35:41 -0000 1.7 @@ -52,6 +52,10 @@ static bool using_default_encoder = true; //static string xmlFileName = ""; + static ArrayList references = new ArrayList(); + static ArrayList soft_references = new ArrayList(); + static ArrayList link_paths = new ArrayList(); + static ArrayList defines; public static void ShowTime (string msg) { @@ -220,7 +224,7 @@ // // Returns the directory where the system assemblies are installed // - static string GetSystemDir () + static string GetSystemDir() { Assembly [] assemblies = AppDomain.CurrentDomain.GetAssemblies (); @@ -416,6 +420,103 @@ return false; } + static void SetupDefaultDefines() + { + defines = new ArrayList(); + defines.Add("__MonoCS__"); + defines.Add("__MCSDoc__"); + } + + public static void LoadReferences() + { + foreach(string r in references) + LoadAssembly(r, false); + foreach(string s in soft_references) + LoadAssembly(s, true); + } + + static void LoadAssembly(string assembly, bool isSoft) + { + Assembly a; + string total_log = ""; + + try + { + char[] path_chars = { '/', '\\', '.' }; + if(assembly.IndexOfAny(path_chars) != -1) + { + a = Assembly.LoadFrom(assembly); + } else + { + a = Assembly.Load(assembly); + } + TypeManager.AddAssembly(a); + } catch(FileNotFoundException) + { + foreach(string dir in link_paths) + { + string full_path = Path.Combine(dir, assembly); + if (!assembly.EndsWith(".dll")) + full_path += ".dll"; + + try + { + a = Assembly.LoadFrom(full_path); + TypeManager.AddAssembly(a); + return; + } catch (FileNotFoundException ff) + { + total_log += ff.FusionLog; + continue; + } + } + if(!isSoft) + { + Report.Error(6, "Cannot find assembly `" + assembly + "'" ); + Console.WriteLine("Log: \n" + total_log); + } + } catch(BadImageFormatException f) + { + Report.Error(6, "Cannot load assembly (bad file format)" + f.FusionLog); + } catch(FileLoadException f) + { + Report.Error(6, "Cannot load assembly " + f.FusionLog); + } catch(ArgumentNullException) + { + Report.Error(6, "Cannot load assembly (null argument)"); + } + } + + static void DefineDefaultConfig() + { + string [] default_config = { + "System", + "System.Xml", + "Accessibility", + "System.Configuration.Install", + "System.Data", + "System.Design", + "System.DirectoryServices", + "System.Drawing.Design", + "System.Drawing", + "System.EnterpriseServices", + "System.Management", + "System.Messaging", + "System.Runtime.Remoting", + "System.Runtime.Serialization.Formatters.Soap", + "System.Security", + "System.ServiceProcess", + "System.Web", + "System.Web.RegularExpressions", + "System.Web.Services", + "System.Windows.Forms" + }; + + int p = 0; + foreach (string def in default_config) + soft_references.Insert (p++, def); + } + /// <summary> /// Parses the arguments, and drives the compilation /// process. @@ -438,6 +539,8 @@ encoding = Encoding.GetEncoding (1252); } + SetupDefaultDefines(); + int argc = args.Length; for (i = 0; i < argc; i++){ string arg = args [i]; @@ -505,6 +608,43 @@ return false; } + if(Report.Errors > 0) + return false; + + if(RootContext.StdLib) + { + references.Insert(0, "mscorlib"); + } + + DefineDefaultConfig(); + + if(Report.Errors > 0) + return false; + + link_paths.Add(GetSystemDir()); + LoadReferences(); + + if(Report.Errors > 0) + return false; + + if(!RootContext.StdLib) + { + RootContext.ResolveCore(); + if(Report.Errors > 0) + return false; + } + + //TypeManager.InitCoreTypes(); + //RootContext.ResolveTree(); + if(!RootContext.StdLib) + RootContext.BootCorlib_PopulateCoreTypes(); + + RootContext.PopulateTypes (); + RootContext.DefineTypes (); + + if(Report.Errors > 0) + return false; + TypeContainer tc = RootContext.Tree.Types; ArrayList tree = tc.Types; foreach(object current in tree) @@ -535,7 +675,7 @@ return (Report.Errors == 0); } - + static string DisplayClass(Class klass) { string retVal = ": "; |
From: Gaurav V. <mas...@us...> - 2003-02-25 06:34:12
|
Update of /cvsroot/csdoc/csdoc/src/csdoc/MCSDoc In directory sc8-pr-cvs1:/tmp/cvs-serv20971/MCSDoc Log Message: Directory /cvsroot/csdoc/csdoc/src/csdoc/MCSDoc added to the repository |
From: Gaurav V. <mas...@us...> - 2003-02-25 05:10:50
|
Update of /cvsroot/csdoc/csdoc/src/csdoc In directory sc8-pr-cvs1:/tmp/cvs-serv30495 Modified Files: .cvsignore ChangeLog Log Message: 2003-02-25 * .cvsignore : Ignore also xml, diff Index: .cvsignore =================================================================== RCS file: /cvsroot/csdoc/csdoc/src/csdoc/.cvsignore,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- .cvsignore 23 Feb 2003 16:13:04 -0000 1.2 +++ .cvsignore 25 Feb 2003 05:10:46 -0000 1.3 @@ -1,5 +1,7 @@ *.exe *.dll +*.xml +*.diff compiler.pdb compiler.exe compiler.suo Index: ChangeLog =================================================================== RCS file: /cvsroot/csdoc/csdoc/src/csdoc/ChangeLog,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- ChangeLog 24 Feb 2003 08:33:49 -0000 1.11 +++ ChangeLog 25 Feb 2003 05:10:46 -0000 1.12 @@ -1,4 +1,8 @@ +2003-02-25 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> + + * .cvsignore : Ignore also xml, diff + 2003-02-24 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> * cs-parser.jay : Using SaveDocument() and |
From: Gaurav V. <mas...@us...> - 2003-02-25 05:07:36
|
Update of /cvsroot/csdoc/csdoc/src/tests In directory sc8-pr-cvs1:/tmp/cvs-serv29621 Modified Files: ChangeLog Added Files: test_12.cs Log Message: 2003-02-25 * test_12.cs : Added new test. --- NEW FILE --- using System; /// <summary>test_12</summary> public interface test_12 { /// <summary>Returns M1</summary> int GetM1(); /// <summary>Gets or Sets P1</summary> int /// <remarks>Nuisance</remarks> P1 { get; set; } } Index: ChangeLog =================================================================== RCS file: /cvsroot/csdoc/csdoc/src/tests/ChangeLog,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- ChangeLog 21 Feb 2003 11:24:36 -0000 1.7 +++ ChangeLog 25 Feb 2003 05:07:33 -0000 1.8 @@ -1,4 +1,8 @@ +2003-02-25 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> + + * test_12.cs : Added new test. + 2003-02-21 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> * test_11.cs : Added new test. |
From: Gaurav V. <mas...@us...> - 2003-02-24 08:33:59
|
Update of /cvsroot/csdoc/csdoc/src/csdoc In directory sc8-pr-cvs1:/tmp/cvs-serv3287 Modified Files: ChangeLog class.cs cs-parser.jay cs-tokenizer.cs decl.cs ecore.cs interface.cs makefile parameter.cs Log Message: 2003-02-24 * cs-parser.jay : Using SaveDocument() and <type>::Documentation * cs-tokenizer.cs : SaveDocument() - Added : Hashtable Documentation { get; } - Removed : GetDocs() - Added * decl.cs, interface.cs, ecore.cs : string Documentation - Added. * makefile : doc - Added target clean - Remove *.dll * decl.cs, class.cs, parameter.cs : Some fixes on doc-comments. Index: ChangeLog =================================================================== RCS file: /cvsroot/csdoc/csdoc/src/csdoc/ChangeLog,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- ChangeLog 23 Feb 2003 16:39:01 -0000 1.10 +++ ChangeLog 24 Feb 2003 08:33:49 -0000 1.11 @@ -1,4 +1,20 @@ +2003-02-24 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> + + * cs-parser.jay : Using SaveDocument() and + <type>::Documentation + * cs-tokenizer.cs : SaveDocument() - Added + : Hashtable Documentation { get; } + - Removed + : GetDocs() - Added + * decl.cs, interface.cs, ecore.cs + : string Documentation + - Added. + * makefile : doc - Added target + clean - Remove *.dll + * decl.cs, class.cs, parameter.cs + : Some fixes on doc-comments. + 2003-02-23 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> * cs-parser.jay : Collect docs for Indexer. Index: class.cs =================================================================== RCS file: /cvsroot/csdoc/csdoc/src/csdoc/class.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- class.cs 21 Feb 2003 11:29:55 -0000 1.2 +++ class.cs 24 Feb 2003 08:33:50 -0000 1.3 @@ -3828,7 +3828,7 @@ } } - /// </summary> + /// <summary> /// Gigantic workaround for lameness in SRE follows : /// This class derives from EventInfo and attempts to basically /// wrap around the EventBuilder so that FindMembers can quickly Index: cs-parser.jay =================================================================== RCS file: /cvsroot/csdoc/csdoc/src/csdoc/cs-parser.jay,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- cs-parser.jay 23 Feb 2003 16:39:02 -0000 1.5 +++ cs-parser.jay 24 Feb 2003 08:33:50 -0000 1.6 @@ -650,7 +650,8 @@ current_container = new_struct; current_container.Namespace = current_namespace; RootContext.Tree.RecordDecl (full_struct_name, new_struct); - lexer.SaveDocumentFor(new_struct); + new_struct.Documentation = lexer.GetDocs(); + lexer.SaveDocument(); } opt_class_base struct_body @@ -715,7 +716,8 @@ (Expression) constant.expression_or_array_initializer, (int) $2, (Attributes) $1, l); CheckDef (current_container.AddConstant (c), c.Name, l); - lexer.SaveDocumentFor(c); + c.Documentation = lexer.GetDocs(); + lexer.SaveDocument(); } } ; @@ -760,7 +762,8 @@ (Attributes) $1, l); CheckDef (current_container.AddField (field), field.Name, l); - lexer.SaveDocumentFor(field); + field.Documentation = lexer.GetDocs(); + lexer.SaveDocument(); } } ; @@ -870,7 +873,8 @@ //System.Console.WriteLine("MethodName : " + method.Name); //System.Console.WriteLine("LexerLocation : " + lexer.Location.Row); //System.Console.WriteLine("MethodLocation: " + method.Location.Row); - lexer.SaveDocumentFor(method); + method.Documentation = lexer.GetDocs(); + lexer.SaveDocument(); current_local_parameters = (Parameters) $6; $$ = method; @@ -884,7 +888,8 @@ Method method = new Method (TypeManager.system_void_expr, (int) $2, (string) $4, (Parameters) $6, (Attributes) $1, lexer.Location); - lexer.SaveDocumentFor(method); + method.Documentation = lexer.GetDocs(); + lexer.SaveDocument(); current_local_parameters = (Parameters) $6; $$ = method; } @@ -1002,7 +1007,8 @@ (Attributes) $1, loc); CheckDef (current_container.AddProperty (prop), prop.Name, loc); - lexer.SaveDocumentFor(prop); + prop.Documentation = lexer.GetDocs(); + lexer.SaveDocument(); implicit_value_parameter_type = null; } ; @@ -1106,7 +1112,8 @@ current_interface = new_interface; new_interface.Namespace = current_namespace; RootContext.Tree.RecordDecl (full_interface_name, new_interface); - lexer.SaveDocumentFor(new_interface); + new_interface.Documentation = lexer.GetDocs(); + lexer.SaveDocument(); } opt_interface_base interface_body opt_semicolon @@ -1200,18 +1207,22 @@ OPEN_PARENS opt_formal_parameter_list CLOSE_PARENS SEMICOLON { - $$ = new InterfaceMethod ((Expression) $3, (string) $4, (bool) $2, + InterfaceMethod im = new InterfaceMethod ((Expression) $3, (string) $4, (bool) $2, (Parameters) $6, (Attributes) $1, lexer.Location); - lexer.SaveDocumentFor((InterfaceMethod)$$); + im.Documentation = lexer.GetDocs(); + $$ = im; + lexer.SaveDocument(); } | opt_attributes opt_new VOID IDENTIFIER OPEN_PARENS opt_formal_parameter_list CLOSE_PARENS SEMICOLON { - $$ = new InterfaceMethod ( + InterfaceMethod im = new InterfaceMethod ( TypeManager.system_void_expr, (string) $4, (bool) $2, (Parameters) $6, (Attributes) $1, lexer.Location); - lexer.SaveDocumentFor($$); + im.Documentation = lexer.GetDocs(); + $$ = im; + lexer.SaveDocument(); } ; @@ -1227,10 +1238,12 @@ { int gs = (int) $7; - $$ = new InterfaceProperty ((Expression) $3, (string) $4, (bool) $2, + InterfaceProperty ip = new InterfaceProperty ((Expression) $3, (string) $4, (bool) $2, (gs & 1) == 1, (gs & 2) == 2, (Attributes) $1, lexer.Location); - lexer.SaveDocumentFor($$); + ip.Documentation = lexer.GetDocs(); + $$ = ip; + lexer.SaveDocument(); } ; @@ -1246,9 +1259,11 @@ interface_event_declaration : opt_attributes opt_new EVENT type IDENTIFIER SEMICOLON { - $$ = new InterfaceEvent ((Expression) $4, (string) $5, (bool) $2, (Attributes) $1, + InterfaceEvent ie = new InterfaceEvent ((Expression) $4, (string) $5, (bool) $2, (Attributes) $1, lexer.Location); - lexer.SaveDocumentFor((InterfaceEvent)$$); + ie.Documentation = lexer.GetDocs(); + $$ = ie; + lexer.SaveDocument(); } ; @@ -1266,9 +1281,11 @@ bool do_get = (a_flags & 1) == 1; bool do_set = (a_flags & 2) == 2; - $$ = new InterfaceIndexer ((Expression) $3, (Parameters) $6, do_get, do_set, + InterfaceIndexer ii = new InterfaceIndexer ((Expression) $3, (Parameters) $6, do_get, do_set, (bool) $2, (Attributes) $1, lexer.Location); - lexer.SaveDocumentFor((InterfaceIndexer)$$); + ii.Documentation = lexer.GetDocs(); + $$ = ii; + lexer.SaveDocument(); } ; @@ -1282,7 +1299,8 @@ // Note again, checking is done in semantic analysis current_container.AddOperator (op); - lexer.SaveDocumentFor(op); + op.Documentation = lexer.GetDocs(); + lexer.SaveDocument(); current_local_parameters = null; } @@ -1455,8 +1473,10 @@ opt_constructor_initializer { Location l = (Location) oob_stack.Pop (); - $$ = new Constructor ((string) $1, (Parameters) $3, (ConstructorInitializer) $6, l); - lexer.SaveDocumentFor($$); + Constructor ctor = new Constructor ((string) $1, (Parameters) $3, (ConstructorInitializer) $6, l); + ctor.Documentation = lexer.GetDocs(); + $$ = ctor; + lexer.SaveDocument(); } ; @@ -1503,7 +1523,8 @@ d.Block = (Block) $6; CheckDef (current_container.AddMethod (d), d.Name, d.Location); - lexer.SaveDocumentFor(d); + d.Documentation = lexer.GetDocs(); + lexer.SaveDocument(); } } ; @@ -1521,7 +1542,8 @@ (int) $2, null, null, (Attributes) $1, lexer.Location); CheckDef (current_container.AddEvent (e), e.Name, e.Location); - lexer.SaveDocumentFor(e); + e.Documentation = lexer.GetDocs(); + lexer.SaveDocument(); } } | opt_attributes @@ -1552,7 +1574,8 @@ Event e = new Event ((Expression) $4, (string) $5, null, (int) $2, add_accessor, rem_accessor, (Attributes) $1, loc); - lexer.SaveDocumentFor(e); + e.Documentation = lexer.GetDocs(); + lexer.SaveDocument(); CheckDef (current_container.AddEvent (e), e.Name, loc); implicit_value_parameter_type = null; @@ -1651,7 +1674,8 @@ current_local_parameters = null; implicit_value_parameter_type = null; indexer_parameters = null; - lexer.SaveDocumentFor(indexer); + indexer.Documentation = lexer.GetDocs(); + lexer.SaveDocument(); } ; @@ -1665,7 +1689,8 @@ } $$ = new IndexerDeclaration ((Expression) $1, null, pars); - lexer.SaveDocumentFor((IndexerDeclaration)$$); + //$$.Documentation = lexer.GetDocs(); + //lexer.SaveDocument(); } | type qualified_identifier DOT THIS OPEN_BRACKET opt_formal_parameter_list CLOSE_BRACKET { @@ -1675,7 +1700,8 @@ Report.Error (1551, lexer.Location, "Indexers must have at least one parameter"); } $$ = new IndexerDeclaration ((Expression) $1, (string) $2, pars); - lexer.SaveDocumentFor((IndexerDeclaration)$$); + //$$.Documentation = lexer.GetDocs(); + //lexer.SaveDocument(); } ; @@ -1706,7 +1732,8 @@ CheckDef (current_container.AddEnum (e), full_name, enum_location); RootContext.Tree.RecordDecl (full_name, e); - lexer.SaveDocumentFor(e); + e.Documentation = lexer.GetDocs(); + lexer.SaveDocument(); } ; @@ -1749,8 +1776,10 @@ enum_member_declaration : opt_attributes IDENTIFIER { - $$ = new VariableDeclaration ((string) $2, null, lexer.Location, (Attributes) $1); - lexer.SaveDocumentFor($$); + VariableDeclaration vd = new VariableDeclaration ((string) $2, null, lexer.Location, (Attributes) $1); + vd.Documentation = lexer.GetDocs(); + $$ = vd; + lexer.SaveDocument(); } | opt_attributes IDENTIFIER { @@ -1758,8 +1787,10 @@ } ASSIGN expression { - $$ = new VariableDeclaration ((string) $2, $5, lexer.Location, (Attributes) $1); - lexer.SaveDocumentFor($$); + VariableDeclaration vd = new VariableDeclaration ((string) $2, $5, lexer.Location, (Attributes) $1); + vd.Documentation = lexer.GetDocs(); + $$ = vd; + lexer.SaveDocument(); } ; @@ -1779,7 +1810,8 @@ del.Namespace = current_namespace; CheckDef (current_container.AddDelegate (del), del.Name, l); - lexer.SaveDocumentFor(del); + del.Documentation = lexer.GetDocs(); + lexer.SaveDocument(); } | opt_attributes opt_modifiers @@ -1797,7 +1829,8 @@ del.Namespace = current_namespace; CheckDef (current_container.AddDelegate (del), del.Name, l); - lexer.SaveDocumentFor(del); + del.Documentation = lexer.GetDocs(); + lexer.SaveDocument(); } ; @@ -2622,7 +2655,8 @@ new_class = new Class (current_container, name, (int) $2, (Attributes) $1, lexer.Location); - lexer.SaveDocumentFor(new_class); + new_class.Documentation = lexer.GetDocs(); + lexer.SaveDocument(); current_container = new_class; current_container.Namespace = current_namespace; RootContext.Tree.RecordDecl (name, new_class); @@ -2632,7 +2666,6 @@ opt_semicolon { Class new_class = (Class) current_container; - //lexer.SaveDocumentFor(new_class); if ($6 != null) new_class.Bases = (ArrayList) $6; @@ -3621,6 +3654,11 @@ public object expression_or_array_initializer; public Location Location; public Attributes OptAttributes; + + /// <summary> + /// Holds the documentation string. + /// </summary> + public string Documentation; public VariableDeclaration (string id, object eoai, Location l, Attributes opt_attrs) { Index: cs-tokenizer.cs =================================================================== RCS file: /cvsroot/csdoc/csdoc/src/csdoc/cs-tokenizer.cs,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- cs-tokenizer.cs 21 Feb 2003 11:29:55 -0000 1.6 +++ cs-tokenizer.cs 24 Feb 2003 08:33:50 -0000 1.7 @@ -58,15 +58,11 @@ // Adding support for documentation. // Modified by Gaurav Vaish - private Hashtable documentationStrings = new Hashtable(); private string commentString = ""; private bool isCollectingDocs = true; - public void SaveDocumentFor(object new_class) + public void SaveDocument() { - //if(!documentationStrings.ContainsKey(new_class)) - documentationStrings[new_class] = commentString; - //System.Console.WriteLine("Document for {0}:\n\n{1}", new_class.ToString(), commentString); commentString = ""; isCollectingDocs = true; } @@ -76,12 +72,9 @@ isCollectingDocs = false; } - public Hashtable Documentation + public string GetDocs() { - get - { - return documentationStrings; - } + return commentString; } private static Hashtable TokenValueName Index: decl.cs =================================================================== RCS file: /cvsroot/csdoc/csdoc/src/csdoc/decl.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- decl.cs 19 Feb 2003 05:50:12 -0000 1.1 +++ decl.cs 24 Feb 2003 08:33:51 -0000 1.2 @@ -37,6 +37,11 @@ /// </summary> public readonly Location Location; + /// <summary> + /// Holds the doc-comments. + /// </summary> + public string Documentation; + public MemberCore (string name, Location loc) { //if(name != "") @@ -412,7 +417,7 @@ /// <remarks> /// Should be overriten by the appropriate declaration space - /// <remarks> + /// </remarks> public abstract TypeBuilder DefineType (); /// <summary> Index: ecore.cs =================================================================== RCS file: /cvsroot/csdoc/csdoc/src/csdoc/ecore.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- ecore.cs 19 Feb 2003 05:50:12 -0000 1.1 +++ ecore.cs 24 Feb 2003 08:33:51 -0000 1.2 @@ -190,6 +190,11 @@ protected Type type; protected Location loc; + /// <summary> + /// Holds the doc-comments. + /// </summary> + public string Documentation; + public Type Type { get { return type; Index: interface.cs =================================================================== RCS file: /cvsroot/csdoc/csdoc/src/csdoc/interface.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- interface.cs 19 Feb 2003 05:50:12 -0000 1.1 +++ interface.cs 24 Feb 2003 08:33:51 -0000 1.2 @@ -972,6 +972,11 @@ public readonly bool IsNew; public Attributes OptAttributes; + /// <summary> + /// Holds the doc-comments. + /// </summary> + public string Documentation; + public InterfaceMemberBase (string name, bool is_new, Attributes attrs) { Name = name; Index: makefile =================================================================== RCS file: /cvsroot/csdoc/csdoc/src/csdoc/makefile,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- makefile 23 Feb 2003 16:13:05 -0000 1.2 +++ makefile 24 Feb 2003 08:33:51 -0000 1.3 @@ -58,8 +58,14 @@ cs-parser.cs: cs-parser.jay ../jay/jay -ctv < ../jay/skeleton.cs cs-parser.jay > cs-parser.cs +mcsdoc: $(BINARY) + ./$(BINARY) $(COMPILER_SOURCES) + +doc: cs-parser.cs $(COMPILER_SOURCES) + $(CSC) $(CSCFLAGS) /nowarn:1591 /doc:mcsdoc.xml $(COMPILER_SOURCES) + #pn: # ../jay/jay -ctv < ../jay/skeleton.cs cs-parser.jay | grep -v '#line' > cs-parser.cs clean: - rm -f *.exe cs-parser.cs y.output *.pdb *~ .*~ mcs.log response + rm -f *.exe cs-parser.cs y.output *.pdb *~ .*~ mcs.log response *.dll Index: parameter.cs =================================================================== RCS file: /cvsroot/csdoc/csdoc/src/csdoc/parameter.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- parameter.cs 19 Feb 2003 05:50:12 -0000 1.1 +++ parameter.cs 24 Feb 2003 08:33:51 -0000 1.2 @@ -371,7 +371,7 @@ /// boolean whether this is an out or ref parameter. /// /// Note that the returned type will not contain any dereference in this - /// case (ie, you get "int" for a ref int instead of "int&" + /// case (ie, you get "int" for a ref int instead of "int&") /// </summary> public Type GetParameterInfo (DeclSpace ds, int idx, out Parameter.Modifier mod) { |
From: Gaurav V. <mas...@us...> - 2003-02-23 16:39:06
|
Update of /cvsroot/csdoc/csdoc/src/csdoc In directory sc8-pr-cvs1:/tmp/cvs-serv2597 Modified Files: ChangeLog cs-parser.jay Log Message: 2003-02-23 * cs-parser.jay : Collect docs for Indexer. Index: ChangeLog =================================================================== RCS file: /cvsroot/csdoc/csdoc/src/csdoc/ChangeLog,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- ChangeLog 23 Feb 2003 16:13:04 -0000 1.9 +++ ChangeLog 23 Feb 2003 16:39:01 -0000 1.10 @@ -1,6 +1,10 @@ 2003-02-23 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> + * cs-parser.jay : Collect docs for Indexer. + +2003-02-23 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> + * .cvsignore : Ignore *.dll, *.exe, mcsdoc * makefile : Target for dll. : Renamed binary to "mcsdoc.exe". Index: cs-parser.jay =================================================================== RCS file: /cvsroot/csdoc/csdoc/src/csdoc/cs-parser.jay,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- cs-parser.jay 20 Feb 2003 14:26:12 -0000 1.4 +++ cs-parser.jay 23 Feb 2003 16:39:02 -0000 1.5 @@ -1651,6 +1651,7 @@ current_local_parameters = null; implicit_value_parameter_type = null; indexer_parameters = null; + lexer.SaveDocumentFor(indexer); } ; |