csdoc-patches Mailing List for C Sharp Document Generator (XML/HTML) (Page 6)
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-02-23 16:13:12
|
Update of /cvsroot/csdoc/csdoc/src/csdoc
In directory sc8-pr-cvs1:/tmp/cvs-serv17551
Modified Files:
.cvsignore ChangeLog makefile
Log Message:
2003-02-23
* .cvsignore : Ignore *.dll, *.exe, mcsdoc
* makefile : Target for dll.
: Renamed binary to "mcsdoc.exe".
Index: .cvsignore
===================================================================
RCS file: /cvsroot/csdoc/csdoc/src/csdoc/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore 19 Feb 2003 05:49:40 -0000 1.1
+++ .cvsignore 23 Feb 2003 16:13:04 -0000 1.2
@@ -1,3 +1,5 @@
+*.exe
+*.dll
compiler.pdb
compiler.exe
compiler.suo
@@ -6,4 +8,4 @@
cs-parser.cs
y.output
*.pdb
-mcs
+mcsdoc
\ No newline at end of file
Index: ChangeLog
===================================================================
RCS file: /cvsroot/csdoc/csdoc/src/csdoc/ChangeLog,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- ChangeLog 21 Feb 2003 11:29:55 -0000 1.8
+++ ChangeLog 23 Feb 2003 16:13:04 -0000 1.9
@@ -1,4 +1,10 @@
+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".
+
2003-02-21 Gaurav Vaish <mastergaurav AT users DOT sf DOT net>
* class.cs, cs-0tokenizer.cs : Added my name as author.
Index: makefile
===================================================================
RCS file: /cvsroot/csdoc/csdoc/src/csdoc/makefile,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- makefile 19 Feb 2003 05:50:12 -0000 1.1
+++ makefile 23 Feb 2003 16:13:05 -0000 1.2
@@ -1,7 +1,8 @@
CSC=csc.exe
CSCFLAGS=/nologo /optimize
-BINARY=csdoc.exe
-VERSION=0.13
+BINARY=mcsdoc.exe
+DLL=mcsdoc.dll
+#VERSION=0.13
COMMON_SOURCES = cs-parser.cs cs-tokenizer.cs tree.cs location.cs
@@ -40,6 +41,11 @@
$(BINARY): cs-parser.cs $(COMPILER_SOURCES)
$(CSC) $(CSCFLAGS) /target:exe /out:$@ $(COMPILER_SOURCES)
+
+dll: $(DLL)
+
+$(DLL): cs-parser.cs $(COMPILER_SOURCES)
+ $(CSC) $(CSCFLAGS) /target:library /out:$@ $(COMPILER_SOURCES)
windows: all
|
|
From: Gaurav V. <mas...@us...> - 2003-02-23 15:53:14
|
Update of /cvsroot/csdoc/csdoc/src/csdoc In directory sc8-pr-cvs1:/tmp/cvs-serv4985 Removed Files: compiler.sln mcs.exe.config Log Message: 2003-02-23 * compiler.sln, mcs.exe.config: Don't need them now! --- compiler.sln DELETED --- --- mcs.exe.config DELETED --- |
|
From: Gaurav V. <mas...@us...> - 2003-02-21 11:29:59
|
Update of /cvsroot/csdoc/csdoc/src/csdoc In directory sc8-pr-cvs1:/tmp/cvs-serv19835 Modified Files: ChangeLog class.cs cs-tokenizer.cs driver.cs Log Message: 2003-02-21 * class.cs, cs-0tokenizer.cs : Added my name as author. * driver.cs : Playing with the stuff. Index: ChangeLog =================================================================== RCS file: /cvsroot/csdoc/csdoc/src/csdoc/ChangeLog,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- ChangeLog 21 Feb 2003 07:08:53 -0000 1.7 +++ ChangeLog 21 Feb 2003 11:29:55 -0000 1.8 @@ -1,6 +1,11 @@ 2003-02-21 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> + * class.cs, cs-0tokenizer.cs : Added my name as author. + * driver.cs : Playing with the stuff. + +2003-02-21 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> + * cs-tokenizer.cs : Reset comment if there is a blank line between the comment and actual code. * driver.cs : Get all types from RootContext. Index: class.cs =================================================================== RCS file: /cvsroot/csdoc/csdoc/src/csdoc/class.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- class.cs 19 Feb 2003 05:50:11 -0000 1.1 +++ class.cs 21 Feb 2003 11:29:55 -0000 1.2 @@ -1,12 +1,13 @@ // // class.cs: Class and Struct handlers // -// Authors: Miguel de Icaza (mi...@gn...) -// Martin Baulig (ma...@gn...) // -// Licensed under the terms of the GNU GPL +// Author: Gaurav Vaish <mas...@us...> // -// (C) 2001, 2002 Ximian, Inc (http://www.ximian.com) +// Licensed under the terms of the GNU GPL. +// +// (C) 2003 Gaurav Vaish +// Original Authors: Miguel, Ravi, Martin // // // 2002-10-11 Miguel de Icaza <mi...@xi...> Index: cs-tokenizer.cs =================================================================== RCS file: /cvsroot/csdoc/csdoc/src/csdoc/cs-tokenizer.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- cs-tokenizer.cs 21 Feb 2003 07:08:53 -0000 1.5 +++ cs-tokenizer.cs 21 Feb 2003 11:29:55 -0000 1.6 @@ -2,11 +2,12 @@ // cs-tokenizer.cs: The Tokenizer for the C# compiler // This also implements the preprocessor // -// Author: Miguel de Icaza (mi...@gn...) +// Author: Gaurav Vaish <mas...@us...> // -// Licensed under the terms of the GNU GPL +// Licensed under the terms of the GNU GPL. // -// (C) 2001, 2002 Ximian, Inc (http://www.ximian.com) +// (C) 2003 Gaurav Vaish +// Original Authors: Miguel, Ravi, Martin // /* Index: driver.cs =================================================================== RCS file: /cvsroot/csdoc/csdoc/src/csdoc/driver.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- driver.cs 21 Feb 2003 07:08:53 -0000 1.5 +++ driver.cs 21 Feb 2003 11:29:56 -0000 1.6 @@ -1,14 +1,11 @@ // -// driver.cs: The compiler command line driver. -// // Author: Gaurav Vaish <mas...@us...> // -// Licensed under the terms of the GNU GPL +// Licensed under the terms of the GNU GPL. // // (C) 2003 Gaurav Vaish +// Original Authors: Miguel, Ravi, Martin // -// Original author: Miguel de Icaza (mi...@gn...) -// Original (C): 2001, Ximian Inc namespace Mono.CSharp { @@ -513,18 +510,51 @@ foreach(object current in tree) { string dispName = ""; + string baseNames = ""; if(current is Class) - dispName = ((Class)current).Name; + { + baseNames = DisplayClass((Class)current); + dispName = ((Class)current).Name + baseNames; + } else if(current is Struct) dispName = ((Struct)current).Name; Console.WriteLine("<type>: " + current.GetType().ToString() + "->" + dispName); } - foreach(Interface interf in tc.Interfaces) - { - Console.WriteLine("<type>: " + interf.GetType().ToString() + "->" + interf.Name); - } + 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); + } + 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); + } return (Report.Errors == 0); + } + + static string DisplayClass(Class klass) + { + string retVal = ": "; + ArrayList b = klass.Bases; + if(b == null || b.Count == 0) + { + Console.WriteLine("------- No Bases -------"); + return String.Empty; + } + 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() + ", "); + } + return retVal.Substring(0, retVal.Length - 2); } } } |
|
From: Gaurav V. <mas...@us...> - 2003-02-21 11:24:39
|
Update of /cvsroot/csdoc/csdoc/src/tests
In directory sc8-pr-cvs1:/tmp/cvs-serv17938
Modified Files:
ChangeLog
Added Files:
test_11.cs
Log Message:
2003-02-21
* test_11.cs : Added new test.
--- NEW FILE ---
using System;
/**
* <summary>CSDoc.Test/summary>
*/
namespace CSDoc.Test
{
/// <summary>Enumeration values for test_11</summary>
public enum test_11
{
/// ONE
ONE,
/// TWO
TWO
}
}
Index: ChangeLog
===================================================================
RCS file: /cvsroot/csdoc/csdoc/src/tests/ChangeLog,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- ChangeLog 21 Feb 2003 07:09:46 -0000 1.6
+++ ChangeLog 21 Feb 2003 11:24:36 -0000 1.7
@@ -1,6 +1,10 @@
2003-02-21 Gaurav Vaish <mastergaurav AT users DOT sf DOT net>
+ * test_11.cs : Added new test.
+
+2003-02-21 Gaurav Vaish <mastergaurav AT users DOT sf DOT net>
+
* test_09.cs,
* test_10.cs : Added new tests.
|
|
From: Gaurav V. <mas...@us...> - 2003-02-21 10:50:33
|
Update of /cvsroot/csdoc/csdoc/src/csdoc In directory sc8-pr-cvs1:/tmp/cvs-serv5070 Removed Files: old-code.cs Log Message: 2003-02-21 * old-code.cs : Removed file. --- old-code.cs DELETED --- |
|
From: Gaurav V. <mas...@us...> - 2003-02-21 07:09:49
|
Update of /cvsroot/csdoc/csdoc/src/tests
In directory sc8-pr-cvs1:/tmp/cvs-serv13782
Modified Files:
ChangeLog
Added Files:
test_09.cs test_10.cs
Log Message:
2003-02-21
* test_09.cs,
* test_10.cs : Added new tests.
--- NEW FILE ---
using System;
/**
* <summary>CSDoc.Test/summary>
*/
namespace CSDoc.Test
{
public class test_09
{
// Comment over test_09::Main(String[] args)
public static void Main(string[] args)
{
System.Console.WriteLine("Inside Main...");
}
}
}
--- NEW FILE ---
using System;
/**
* <summary>CSDoc.Test/summary>
*/
namespace CSDoc.Test
{
public struct test_10
{
public int Zero
{
get
{
return 0;
}
}
}
}
Index: ChangeLog
===================================================================
RCS file: /cvsroot/csdoc/csdoc/src/tests/ChangeLog,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- ChangeLog 20 Feb 2003 14:35:02 -0000 1.5
+++ ChangeLog 21 Feb 2003 07:09:46 -0000 1.6
@@ -1,4 +1,9 @@
+2003-02-21 Gaurav Vaish <mastergaurav AT users DOT sf DOT net>
+
+ * test_09.cs,
+ * test_10.cs : Added new tests.
+
2003-02-20 Gaurav Vaish <mastergaurav AT users DOT sf DOT net>
* test_08.cs : Added new test.
|
|
From: Gaurav V. <mas...@us...> - 2003-02-21 07:08:57
|
Update of /cvsroot/csdoc/csdoc/src/csdoc
In directory sc8-pr-cvs1:/tmp/cvs-serv13494
Modified Files:
ChangeLog cs-tokenizer.cs driver.cs
Log Message:
2003-02-21
* cs-tokenizer.cs : Reset comment if there is a blank
line between the comment and actual code.
* driver.cs : Get all types from RootContext.
Index: ChangeLog
===================================================================
RCS file: /cvsroot/csdoc/csdoc/src/csdoc/ChangeLog,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- ChangeLog 20 Feb 2003 14:31:23 -0000 1.6
+++ ChangeLog 21 Feb 2003 07:08:53 -0000 1.7
@@ -1,4 +1,10 @@
+2003-02-21 Gaurav Vaish <mastergaurav AT users DOT sf DOT net>
+
+ * cs-tokenizer.cs : Reset comment if there is a blank
+ line between the comment and actual code.
+ * driver.cs : Get all types from RootContext.
+
2003-02-20 Gaurav Vaish <mastergaurav AT users DOT sf DOT net>
* driver.cs : Added check for delegate.
Index: cs-tokenizer.cs
===================================================================
RCS file: /cvsroot/csdoc/csdoc/src/csdoc/cs-tokenizer.cs,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- cs-tokenizer.cs 20 Feb 2003 14:26:12 -0000 1.4
+++ cs-tokenizer.cs 21 Feb 2003 07:08:53 -0000 1.5
@@ -1625,7 +1625,7 @@
// Handle double-slash comments.
if (c == '/'){
int d = peekChar ();
-
+ int afterComment;
if (d == '/'){
getChar ();
// Modified by Gaurav Vaish
@@ -1644,6 +1644,9 @@
ref_line++;
col = 0;
}
+ afterComment = peekChar();
+ if(afterComment == '\r' || afterComment=='\n')
+ commentString = "";
any_token_seen |= tokens_seen;
tokens_seen = false;
continue;
@@ -1669,6 +1672,9 @@
any_token_seen |= tokens_seen;
tokens_seen = false;
}
+ afterComment = peekChar();
+ if(afterComment == '\r' || afterComment=='\n')
+ commentString = "";
}
continue;
}
Index: driver.cs
===================================================================
RCS file: /cvsroot/csdoc/csdoc/src/csdoc/driver.cs,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- driver.cs 20 Feb 2003 14:31:24 -0000 1.4
+++ driver.cs 21 Feb 2003 07:08:53 -0000 1.5
@@ -113,47 +113,6 @@
} finally {
input.Close ();
}
- Tokenizer lexer = parser.Lexer;
- Hashtable comments = lexer.Documentation;
- Console.WriteLine("Total keys: " + comments.Count);
- foreach(object key in comments.Keys)
- {
- string displayName = "";
- if(key is Class)
- displayName = ((Class)key).Name;
- else if(key is Method)
- displayName = ((Method)key).Name;
- else if(key is Event)
- displayName = ((Event)key).Name;
- else if(key is Const)
- displayName = ((Const)key).Name;
- else if(key is Constructor)
- displayName = ((Constructor)key).Name;
- else if(key is Interface)
- displayName = ((Interface)key).Name;
- else if(key is InterfaceMethod)
- displayName = ((InterfaceMethod)key).Name;
- else if(key is InterfaceProperty)
- displayName = ((InterfaceProperty)key).Name;
- else if(key is Delegate)
- displayName = ((Delegate)key).Name;
- System.Console.WriteLine("{0}:\n{1}\n", displayName, comments[key]);
- if(key is Method || key is Constructor)
- {
- MethodCore m = (MethodCore)key;
- if(m.Parameters != null)
- {
- Parameters pars = m.Parameters;
- if(pars.FixedParameters != null)
- {
- foreach(Parameter p in pars.FixedParameters)
- {
- Console.WriteLine("Param: <" + p.TypeName.ToString() + "::" + p.Name + ">");
- }
- }
- }
- }
- }
}
static void Usage()
@@ -547,6 +506,22 @@
if (first_source == null){
Report.Error (2008, "No files to compile were specified");
return false;
+ }
+
+ TypeContainer tc = RootContext.Tree.Types;
+ ArrayList tree = tc.Types;
+ foreach(object current in tree)
+ {
+ string dispName = "";
+ if(current is Class)
+ dispName = ((Class)current).Name;
+ else if(current is Struct)
+ dispName = ((Struct)current).Name;
+ Console.WriteLine("<type>: " + current.GetType().ToString() + "->" + dispName);
+ }
+ foreach(Interface interf in tc.Interfaces)
+ {
+ Console.WriteLine("<type>: " + interf.GetType().ToString() + "->" + interf.Name);
}
return (Report.Errors == 0);
|
|
From: Gaurav V. <mas...@us...> - 2003-02-20 14:35:10
|
Update of /cvsroot/csdoc/csdoc/src/tests
In directory sc8-pr-cvs1:/tmp/cvs-serv31945
Modified Files:
ChangeLog
Added Files:
test_08.cs
Log Message:
2003-02-20
* test_08.cs : Added new test.
--- NEW FILE ---
using System;
/// <summary>I should not collect this</summary>
public interface test_08
{
/// <summary>Returns M1</summary>
int GetM1();
/// <summary>Gets or Sets P1</summary>
int P1 { get; set; }
}
Index: ChangeLog
===================================================================
RCS file: /cvsroot/csdoc/csdoc/src/tests/ChangeLog,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- ChangeLog 20 Feb 2003 14:30:26 -0000 1.4
+++ ChangeLog 20 Feb 2003 14:35:02 -0000 1.5
@@ -1,6 +1,10 @@
2003-02-20 Gaurav Vaish <mastergaurav AT users DOT sf DOT net>
+ * test_08.cs : Added new test.
+
+2003-02-20 Gaurav Vaish <mastergaurav AT users DOT sf DOT net>
+
* test_07.cs : Added new test.
2003-02-20 Gaurav Vaish <mastergaurav AT users DOT sf DOT net>
|
|
From: Gaurav V. <mas...@us...> - 2003-02-20 14:31:28
|
Update of /cvsroot/csdoc/csdoc/src/csdoc
In directory sc8-pr-cvs1:/tmp/cvs-serv29814
Modified Files:
ChangeLog driver.cs
Log Message:
2003-02-20
* driver.cs : Added check for delegate.
I will remove all of it ultimately.
Index: ChangeLog
===================================================================
RCS file: /cvsroot/csdoc/csdoc/src/csdoc/ChangeLog,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- ChangeLog 20 Feb 2003 14:26:11 -0000 1.5
+++ ChangeLog 20 Feb 2003 14:31:23 -0000 1.6
@@ -1,6 +1,11 @@
2003-02-20 Gaurav Vaish <mastergaurav AT users DOT sf DOT net>
+ * driver.cs : Added check for delegate.
+ I will remove all of it ultimately.
+
+2003-02-20 Gaurav Vaish <mastergaurav AT users DOT sf DOT net>
+
* cs-parser.jay,
* cs-tokenizer.cs : Don't save any comment after
you hit start of any type (class, method,
Index: driver.cs
===================================================================
RCS file: /cvsroot/csdoc/csdoc/src/csdoc/driver.cs,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- driver.cs 20 Feb 2003 13:54:48 -0000 1.3
+++ driver.cs 20 Feb 2003 14:31:24 -0000 1.4
@@ -135,6 +135,8 @@
displayName = ((InterfaceMethod)key).Name;
else if(key is InterfaceProperty)
displayName = ((InterfaceProperty)key).Name;
+ else if(key is Delegate)
+ displayName = ((Delegate)key).Name;
System.Console.WriteLine("{0}:\n{1}\n", displayName, comments[key]);
if(key is Method || key is Constructor)
{
|
|
From: Gaurav V. <mas...@us...> - 2003-02-20 14:30:35
|
Update of /cvsroot/csdoc/csdoc/src/tests
In directory sc8-pr-cvs1:/tmp/cvs-serv29237
Modified Files:
ChangeLog
Added Files:
test_07.cs
Log Message:
2003-02-20
* test_07.cs : Added new test.
--- NEW FILE ---
using System;
/**
* <summary>test_06</summary>
*/
public class test_07
{
/// <summary>MyDelegate</summary>
public /// <remarks>No, don't collect this</remarks>
delegate void MyDelegate(object sender, EventArgs e);
/// <summary>Returns M1</summary>
int GetM1()
{
return 0;
}
/// <summary>Gets or Sets P1</summary>
int /* Nuisance */ P1
{
/// <remarks>Try comment here</remarks>
get
{
return -1;
}
set
{
/// Do nothing.
}
}
}
Index: ChangeLog
===================================================================
RCS file: /cvsroot/csdoc/csdoc/src/tests/ChangeLog,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- ChangeLog 20 Feb 2003 13:52:18 -0000 1.3
+++ ChangeLog 20 Feb 2003 14:30:26 -0000 1.4
@@ -1,6 +1,10 @@
2003-02-20 Gaurav Vaish <mastergaurav AT users DOT sf DOT net>
+ * test_07.cs : Added new test.
+
+2003-02-20 Gaurav Vaish <mastergaurav AT users DOT sf DOT net>
+
* test_04.cs,
* test_05.cs,
* test_06.cs : Added new tests.
|
|
From: Gaurav V. <mas...@us...> - 2003-02-20 14:26:15
|
Update of /cvsroot/csdoc/csdoc/src/csdoc
In directory sc8-pr-cvs1:/tmp/cvs-serv26570
Modified Files:
ChangeLog cs-parser.jay cs-tokenizer.cs
Log Message:
2003-02-20
* cs-parser.jay,
* cs-tokenizer.cs : Don't save any comment after
you hit start of any type (class, method,
inteface, property. Anything).
Index: ChangeLog
===================================================================
RCS file: /cvsroot/csdoc/csdoc/src/csdoc/ChangeLog,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- ChangeLog 20 Feb 2003 13:54:48 -0000 1.4
+++ ChangeLog 20 Feb 2003 14:26:11 -0000 1.5
@@ -1,6 +1,13 @@
2003-02-20 Gaurav Vaish <mastergaurav AT users DOT sf DOT net>
+ * cs-parser.jay,
+ * cs-tokenizer.cs : Don't save any comment after
+ you hit start of any type (class, method,
+ inteface, property. Anything).
+
+2003-02-20 Gaurav Vaish <mastergaurav AT users DOT sf DOT net>
+
* cs-parser.jay : Save document for more types.
* cs-tokenizer.jay : Keep adding to comments.
* driver.cs : Trying to see if I am getting more
Index: cs-parser.jay
===================================================================
RCS file: /cvsroot/csdoc/csdoc/src/csdoc/cs-parser.jay,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- cs-parser.jay 20 Feb 2003 13:54:48 -0000 1.3
+++ cs-parser.jay 20 Feb 2003 14:26:12 -0000 1.4
@@ -422,8 +422,8 @@
//
opt_attributes
- : /* empty */
- | attribute_sections { $$ = $1; }
+ : /* empty */ { lexer.StopCollectngDocs(); }
+ | { lexer.StopCollectngDocs(); } attribute_sections { $$ = $2; }
;
attribute_sections
@@ -1268,7 +1268,7 @@
$$ = new InterfaceIndexer ((Expression) $3, (Parameters) $6, do_get, do_set,
(bool) $2, (Attributes) $1, lexer.Location);
- lexer.SaveDocumentFor((IntefaceIndexer)$$);
+ lexer.SaveDocumentFor((InterfaceIndexer)$$);
}
;
@@ -1282,7 +1282,7 @@
// Note again, checking is done in semantic analysis
current_container.AddOperator (op);
- lexer.SaveDocumentFor(new_interface);
+ lexer.SaveDocumentFor(op);
current_local_parameters = null;
}
Index: cs-tokenizer.cs
===================================================================
RCS file: /cvsroot/csdoc/csdoc/src/csdoc/cs-tokenizer.cs,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- cs-tokenizer.cs 20 Feb 2003 13:54:48 -0000 1.3
+++ cs-tokenizer.cs 20 Feb 2003 14:26:12 -0000 1.4
@@ -59,6 +59,7 @@
private Hashtable documentationStrings = new Hashtable();
private string commentString = "";
+ private bool isCollectingDocs = true;
public void SaveDocumentFor(object new_class)
{
@@ -66,6 +67,12 @@
documentationStrings[new_class] = commentString;
//System.Console.WriteLine("Document for {0}:\n\n{1}", new_class.ToString(), commentString);
commentString = "";
+ isCollectingDocs = true;
+ }
+
+ public void StopCollectngDocs()
+ {
+ isCollectingDocs = false;
}
public Hashtable Documentation
@@ -1622,14 +1629,17 @@
if (d == '/'){
getChar ();
// Modified by Gaurav Vaish
- commentString += "//";
+ if(isCollectingDocs)
+ commentString += "//";
while ((d = getChar ()) != -1 && (d != '\n') && d != '\r')
{
- commentString += (char)d;
+ if(isCollectingDocs)
+ commentString += (char)d;
col++;
}
if (d == '\n'){
- commentString += '\n';
+ if(isCollectingDocs)
+ commentString += '\n';
line++;
ref_line++;
col = 0;
@@ -1640,15 +1650,18 @@
} else if (d == '*'){
getChar ();
- commentString += "/*";
+ if(isCollectingDocs)
+ commentString += "/*";
while ((d = getChar ()) != -1){
if (d == '*' && peekChar () == '/'){
- commentString += "*/";
+ if(isCollectingDocs)
+ commentString += "*/";
getChar ();
col++;
break;
}
- commentString += (char)d;
+ if(isCollectingDocs)
+ commentString += (char)d;
if (d == '\n'){
line++;
ref_line++;
|
|
From: Gaurav V. <mas...@us...> - 2003-02-20 13:54:52
|
Update of /cvsroot/csdoc/csdoc/src/csdoc
In directory sc8-pr-cvs1:/tmp/cvs-serv10446
Modified Files:
ChangeLog cs-parser.jay cs-tokenizer.cs driver.cs
Log Message:
2003-02-20
* cs-parser.jay : Save document for more types.
* cs-tokenizer.jay : Keep adding to comments.
* driver.cs : Trying to see if I am getting more
types.
Index: ChangeLog
===================================================================
RCS file: /cvsroot/csdoc/csdoc/src/csdoc/ChangeLog,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- ChangeLog 20 Feb 2003 05:40:17 -0000 1.3
+++ ChangeLog 20 Feb 2003 13:54:48 -0000 1.4
@@ -1,6 +1,13 @@
2003-02-20 Gaurav Vaish <mastergaurav AT users DOT sf DOT net>
+ * cs-parser.jay : Save document for more types.
+ * cs-tokenizer.jay : Keep adding to comments.
+ * driver.cs : Trying to see if I am getting more
+ types.
+
+2003-02-20 Gaurav Vaish <mastergaurav AT users DOT sf DOT net>
+
* cs-parser.jay : Comment the bogus output.
* cs-tokenizer.cs : Don't remove the '\n' from comment.
Index: cs-parser.jay
===================================================================
RCS file: /cvsroot/csdoc/csdoc/src/csdoc/cs-parser.jay,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- cs-parser.jay 20 Feb 2003 05:40:17 -0000 1.2
+++ cs-parser.jay 20 Feb 2003 13:54:48 -0000 1.3
@@ -714,8 +714,8 @@
(Expression) $4, (string) constant.identifier,
(Expression) constant.expression_or_array_initializer, (int) $2,
(Attributes) $1, l);
-
CheckDef (current_container.AddConstant (c), c.Name, l);
+ lexer.SaveDocumentFor(c);
}
}
;
@@ -760,6 +760,7 @@
(Attributes) $1, l);
CheckDef (current_container.AddField (field), field.Name, l);
+ lexer.SaveDocumentFor(field);
}
}
;
@@ -783,10 +784,12 @@
: IDENTIFIER ASSIGN variable_initializer
{
$$ = new VariableDeclaration ((string) $1, $3, lexer.Location);
+ //lexer.SaveDocumentFor((VariableDeclaration)$$);
}
| IDENTIFIER
{
$$ = new VariableDeclaration ((string) $1, null, lexer.Location);
+ //lexer.SaveDocumentFor((VariableDeclaration)$$);
}
;
@@ -881,6 +884,7 @@
Method method = new Method (TypeManager.system_void_expr, (int) $2, (string) $4,
(Parameters) $6, (Attributes) $1, lexer.Location);
+ lexer.SaveDocumentFor(method);
current_local_parameters = (Parameters) $6;
$$ = method;
}
@@ -998,6 +1002,7 @@
(Attributes) $1, loc);
CheckDef (current_container.AddProperty (prop), prop.Name, loc);
+ lexer.SaveDocumentFor(prop);
implicit_value_parameter_type = null;
}
;
@@ -1197,6 +1202,7 @@
{
$$ = new InterfaceMethod ((Expression) $3, (string) $4, (bool) $2,
(Parameters) $6, (Attributes) $1, lexer.Location);
+ lexer.SaveDocumentFor((InterfaceMethod)$$);
}
| opt_attributes opt_new VOID IDENTIFIER
OPEN_PARENS opt_formal_parameter_list CLOSE_PARENS
@@ -1205,6 +1211,7 @@
$$ = new InterfaceMethod (
TypeManager.system_void_expr, (string) $4, (bool) $2, (Parameters) $6,
(Attributes) $1, lexer.Location);
+ lexer.SaveDocumentFor($$);
}
;
@@ -1223,6 +1230,7 @@
$$ = new InterfaceProperty ((Expression) $3, (string) $4, (bool) $2,
(gs & 1) == 1, (gs & 2) == 2, (Attributes) $1,
lexer.Location);
+ lexer.SaveDocumentFor($$);
}
;
@@ -1240,6 +1248,7 @@
{
$$ = new InterfaceEvent ((Expression) $4, (string) $5, (bool) $2, (Attributes) $1,
lexer.Location);
+ lexer.SaveDocumentFor((InterfaceEvent)$$);
}
;
@@ -1259,6 +1268,7 @@
$$ = new InterfaceIndexer ((Expression) $3, (Parameters) $6, do_get, do_set,
(bool) $2, (Attributes) $1, lexer.Location);
+ lexer.SaveDocumentFor((IntefaceIndexer)$$);
}
;
@@ -1272,6 +1282,7 @@
// Note again, checking is done in semantic analysis
current_container.AddOperator (op);
+ lexer.SaveDocumentFor(new_interface);
current_local_parameters = null;
}
@@ -1445,6 +1456,7 @@
{
Location l = (Location) oob_stack.Pop ();
$$ = new Constructor ((string) $1, (Parameters) $3, (ConstructorInitializer) $6, l);
+ lexer.SaveDocumentFor($$);
}
;
@@ -1491,6 +1503,7 @@
d.Block = (Block) $6;
CheckDef (current_container.AddMethod (d), d.Name, d.Location);
+ lexer.SaveDocumentFor(d);
}
}
;
@@ -1507,9 +1520,8 @@
var.expression_or_array_initializer,
(int) $2, null, null, (Attributes) $1, lexer.Location);
- lexer.SaveDocumentFor(e);
CheckDef (current_container.AddEvent (e), e.Name, e.Location);
-
+ lexer.SaveDocumentFor(e);
}
}
| opt_attributes
@@ -1652,6 +1664,7 @@
}
$$ = new IndexerDeclaration ((Expression) $1, null, pars);
+ lexer.SaveDocumentFor((IndexerDeclaration)$$);
}
| type qualified_identifier DOT THIS OPEN_BRACKET opt_formal_parameter_list CLOSE_BRACKET
{
@@ -1661,6 +1674,7 @@
Report.Error (1551, lexer.Location, "Indexers must have at least one parameter");
}
$$ = new IndexerDeclaration ((Expression) $1, (string) $2, pars);
+ lexer.SaveDocumentFor((IndexerDeclaration)$$);
}
;
@@ -1735,6 +1749,7 @@
: opt_attributes IDENTIFIER
{
$$ = new VariableDeclaration ((string) $2, null, lexer.Location, (Attributes) $1);
+ lexer.SaveDocumentFor($$);
}
| opt_attributes IDENTIFIER
{
@@ -1743,6 +1758,7 @@
ASSIGN expression
{
$$ = new VariableDeclaration ((string) $2, $5, lexer.Location, (Attributes) $1);
+ lexer.SaveDocumentFor($$);
}
;
Index: cs-tokenizer.cs
===================================================================
RCS file: /cvsroot/csdoc/csdoc/src/csdoc/cs-tokenizer.cs,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- cs-tokenizer.cs 20 Feb 2003 05:40:17 -0000 1.2
+++ cs-tokenizer.cs 20 Feb 2003 13:54:48 -0000 1.3
@@ -1,1810 +1,1813 @@
-//
-// cs-tokenizer.cs: The Tokenizer for the C# compiler
-// This also implements the preprocessor
-//
-// Author: Miguel de Icaza (mi...@gn...)
-//
-// Licensed under the terms of the GNU GPL
-//
-// (C) 2001, 2002 Ximian, Inc (http://www.ximian.com)
-//
-
-/*
- * TODO:
- * Make sure we accept the proper Unicode ranges, per the spec.
- * Report error 1032
-*/
-
-using System;
-using System.Text;
-using System.Collections;
-using System.IO;
-using System.Globalization;
-using System.Reflection;
-
-namespace Mono.CSharp
-{
- /// <summary>
- /// Tokenizer for C# source code.
- /// </summary>
-
- public class Tokenizer : yyParser.yyInput
- {
- StreamReader reader;
- public SourceFile ref_name;
- public SourceFile file_name;
- public int ref_line = 1;
- public int line = 1;
- public int col = 1;
- public int current_token;
- bool handle_get_set = false;
- bool handle_remove_add = false;
- bool handle_assembly = false;
-
- //
- // Whether tokens have been seen on this line
- //
- bool tokens_seen = false;
-
- //
- // Whether a token has been seen on the file
- // This is needed because `define' is not allowed to be used
- // after a token has been seen.
- //
- bool any_token_seen = false;
- static Hashtable tokenValues;
-
- // Adding support for documentation.
- // Modified by Gaurav Vaish
-
- private Hashtable documentationStrings = new Hashtable();
- private string commentString = "";
-
- public void SaveDocumentFor(object new_class)
- {
- documentationStrings[new_class] = commentString;
- //System.Console.WriteLine("Document for {0}:\n\n{1}", new_class.ToString(), commentString);
- commentString = "";
- }
-
- public Hashtable Documentation
- {
- get
- {
- return documentationStrings;
- }
- }
-
- private static Hashtable TokenValueName
- {
- get {
- if (tokenValues == null)
- tokenValues = GetTokenValueNameHash ();
-
- return tokenValues;
- }
- }
-
- private static Hashtable GetTokenValueNameHash ()
- {
- Type t = typeof (Token);
- FieldInfo [] fields = t.GetFields ();
- Hashtable hash = new Hashtable ();
- foreach (FieldInfo field in fields) {
- if (field.IsLiteral && field.IsStatic && field.FieldType == typeof (int))
- hash.Add (field.GetValue (null), field.Name);
- }
- return hash;
- }
-
- //
- // Returns a verbose representation of the current location
- //
- public string location {
- get {
- string det;
-
- if (current_token == Token.ERROR)
- det = "detail: " + error_details;
- else
- det = "";
-
- // return "Line: "+line+" Col: "+col + "\n" +
- // "VirtLine: "+ref_line +
- // " Token: "+current_token + " " + det;
- string current_token_name = TokenValueName [current_token] as string;
- if (current_token_name == null)
- current_token_name = current_token.ToString ();
-
- return String.Format ("{0} ({1},{2}), Token: {3} {4}", ref_name.Name,
- ref_line,
- col,
- current_token_name,
- det);
- }
- }
-
- public bool PropertyParsing {
- get {
- return handle_get_set;
- }
-
- set {
- handle_get_set = value;
- }
- }
-
- public bool AssemblyTargetParsing {
- get {
- return handle_assembly;
- }
-
- set {
- handle_assembly = value;
- }
- }
-
- public bool EventParsing {
- get {
- return handle_remove_add;
- }
-
- set {
- handle_remove_add = value;
- }
- }
-
- //
- // Class variables
- //
- static Hashtable keywords;
- static NumberStyles styles;
- static NumberFormatInfo csharp_format_info;
-
- //
- // Values for the associated token returned
- //
- int putback_char;
- Object val;
-
- //
- // Pre-processor
- //
- Hashtable defines;
-
- const int TAKING = 1;
- const int TAKEN_BEFORE = 2;
- const int ELSE_SEEN = 4;
- const int PARENT_TAKING = 8;
- const int REGION = 16;
-
- //
- // pre-processor if stack state:
- //
- Stack ifstack;
-
- static System.Text.StringBuilder string_builder;
-
- const int max_id_size = 512;
- static char [] id_builder = new char [max_id_size];
-
- const int max_number_size = 128;
- static char [] number_builder = new char [max_number_size];
- static int number_pos;
-
- //
- // Details about the error encoutered by the tokenizer
- //
- string error_details;
-
- public string error {
- get {
- return error_details;
- }
- }
-
- public int Line {
- get {
- return ref_line;
- }
- }
-
- public int Col {
- get {
- return col;
- }
- }
-
- static void InitTokens ()
- {
- keywords = new Hashtable ();
-
- keywords.Add ("abstract", Token.ABSTRACT);
- keywords.Add ("as", Token.AS);
- keywords.Add ("add", Token.ADD);
- keywords.Add ("assembly", Token.ASSEMBLY);
- keywords.Add ("base", Token.BASE);
- keywords.Add ("bool", Token.BOOL);
- keywords.Add ("break", Token.BREAK);
- keywords.Add ("byte", Token.BYTE);
- keywords.Add ("case", Token.CASE);
- keywords.Add ("catch", Token.CATCH);
- keywords.Add ("char", Token.CHAR);
- keywords.Add ("checked", Token.CHECKED);
- keywords.Add ("class", Token.CLASS);
- keywords.Add ("const", Token.CONST);
- keywords.Add ("continue", Token.CONTINUE);
- keywords.Add ("decimal", Token.DECIMAL);
- keywords.Add ("default", Token.DEFAULT);
- keywords.Add ("delegate", Token.DELEGATE);
- keywords.Add ("do", Token.DO);
- keywords.Add ("double", Token.DOUBLE);
- keywords.Add ("else", Token.ELSE);
- keywords.Add ("enum", Token.ENUM);
- keywords.Add ("event", Token.EVENT);
- keywords.Add ("explicit", Token.EXPLICIT);
- keywords.Add ("extern", Token.EXTERN);
- keywords.Add ("false", Token.FALSE);
- keywords.Add ("finally", Token.FINALLY);
- keywords.Add ("fixed", Token.FIXED);
- keywords.Add ("float", Token.FLOAT);
- keywords.Add ("for", Token.FOR);
- keywords.Add ("foreach", Token.FOREACH);
- keywords.Add ("goto", Token.GOTO);
- keywords.Add ("get", Token.GET);
- keywords.Add ("if", Token.IF);
- keywords.Add ("implicit", Token.IMPLICIT);
- keywords.Add ("in", Token.IN);
- keywords.Add ("int", Token.INT);
- keywords.Add ("interface", Token.INTERFACE);
- keywords.Add ("internal", Token.INTERNAL);
- keywords.Add ("is", Token.IS);
- keywords.Add ("lock", Token.LOCK);
- keywords.Add ("long", Token.LONG);
- keywords.Add ("namespace", Token.NAMESPACE);
- keywords.Add ("new", Token.NEW);
- keywords.Add ("null", Token.NULL);
- keywords.Add ("object", Token.OBJECT);
- keywords.Add ("operator", Token.OPERATOR);
- keywords.Add ("out", Token.OUT);
- keywords.Add ("override", Token.OVERRIDE);
- keywords.Add ("params", Token.PARAMS);
- keywords.Add ("private", Token.PRIVATE);
- keywords.Add ("protected", Token.PROTECTED);
- keywords.Add ("public", Token.PUBLIC);
- keywords.Add ("readonly", Token.READONLY);
- keywords.Add ("ref", Token.REF);
- keywords.Add ("remove", Token.REMOVE);
- keywords.Add ("return", Token.RETURN);
- keywords.Add ("sbyte", Token.SBYTE);
- keywords.Add ("sealed", Token.SEALED);
- keywords.Add ("set", Token.SET);
- keywords.Add ("short", Token.SHORT);
- keywords.Add ("sizeof", Token.SIZEOF);
- keywords.Add ("stackalloc", Token.STACKALLOC);
- keywords.Add ("static", Token.STATIC);
- keywords.Add ("string", Token.STRING);
- keywords.Add ("struct", Token.STRUCT);
- keywords.Add ("switch", Token.SWITCH);
- keywords.Add ("this", Token.THIS);
- keywords.Add ("throw", Token.THROW);
- keywords.Add ("true", Token.TRUE);
- keywords.Add ("try", Token.TRY);
- keywords.Add ("typeof", Token.TYPEOF);
- keywords.Add ("uint", Token.UINT);
- keywords.Add ("ulong", Token.ULONG);
- keywords.Add ("unchecked", Token.UNCHECKED);
- keywords.Add ("unsafe", Token.UNSAFE);
- keywords.Add ("ushort", Token.USHORT);
- keywords.Add ("using", Token.USING);
- keywords.Add ("virtual", Token.VIRTUAL);
- keywords.Add ("void", Token.VOID);
- keywords.Add ("volatile", Token.VOLATILE);
- keywords.Add ("while", Token.WHILE);
- }
-
- //
- // Class initializer
- //
- static Tokenizer ()
- {
- InitTokens ();
- csharp_format_info = NumberFormatInfo.InvariantInfo;
- styles = NumberStyles.Float;
-
- string_builder = new System.Text.StringBuilder ();
- }
-
- int GetKeyword (string name)
- {
- object o = keywords [name];
-
- if (o == null)
- return -1;
-
- int res = (int) o;
-
- if (handle_get_set == false && (res == Token.GET || res == Token.SET))
- return -1;
- if (handle_remove_add == false && (res == Token.REMOVE || res == Token.ADD))
- return -1;
- if (handle_assembly == false && res == Token.ASSEMBLY)
- return -1;
- return res;
-
- }
-
- public Location Location {
- get {
- return new Location (ref_line);
- }
- }
-
- void define (string def)
- {
- if (!RootContext.AllDefines.Contains (def)){
- RootContext.AllDefines [def] = true;
- }
- if (defines.Contains (def))
- return;
- defines [def] = true;
- }
-
- public Tokenizer (StreamReader input, SourceFile file, ArrayList defs)
- {
- this.ref_name = file;
- this.file_name = file;
- reader = input;
-
- putback_char = -1;
-
- if (defs != null){
- defines = new Hashtable ();
- foreach (string def in defs)
- define (def);
- }
-
- //
- // FIXME: This could be `Location.Push' but we have to
- // find out why the MS compiler allows this
- //
- Mono.CSharp.Location.Push (file);
- }
-
- bool is_identifier_start_character (char c)
- {
- return (c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z') || c == '_' || Char.IsLetter (c);
- }
-
- bool is_identifier_part_character (char c)
- {
- return (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || c == '_' || (c >= '0' && c <= '9') || Char.IsLetter (c);
- }
-
- int is_punct (char c, ref bool doread)
- {
- int d;
- int t;
-
- doread = false;
-
- switch (c){
- case '{':
- return Token.OPEN_BRACE;
- case '}':
- return Token.CLOSE_BRACE;
- case '[':
- return Token.OPEN_BRACKET;
- case ']':
- return Token.CLOSE_BRACKET;
- case '(':
- return Token.OPEN_PARENS;
- case ')':
- return Token.CLOSE_PARENS;
- case ',':
- return Token.COMMA;
- case ':':
- return Token.COLON;
- case ';':
- return Token.SEMICOLON;
- case '~':
- return Token.TILDE;
- case '?':
- return Token.INTERR;
- }
-
- d = peekChar ();
- if (c == '+'){
-
- if (d == '+')
- t = Token.OP_INC;
- else if (d == '=')
- t = Token.OP_ADD_ASSIGN;
- else
- return Token.PLUS;
- doread = true;
- return t;
- }
- if (c == '-'){
- if (d == '-')
- t = Token.OP_DEC;
- else if (d == '=')
- t = Token.OP_SUB_ASSIGN;
- else if (d == '>')
- t = Token.OP_PTR;
- else
- return Token.MINUS;
- doread = true;
- return t;
- }
-
- if (c == '!'){
- if (d == '='){
- doread = true;
- return Token.OP_NE;
- }
- return Token.BANG;
- }
-
- if (c == '='){
- if (d == '='){
- doread = true;
- return Token.OP_EQ;
- }
- return Token.ASSIGN;
- }
-
- if (c == '&'){
- if (d == '&'){
- doread = true;
- return Token.OP_AND;
- } else if (d == '='){
- doread = true;
- return Token.OP_AND_ASSIGN;
- }
- return Token.BITWISE_AND;
- }
-
- if (c == '|'){
- if (d == '|'){
- doread = true;
- return Token.OP_OR;
- } else if (d == '='){
- doread = true;
- return Token.OP_OR_ASSIGN;
- }
- return Token.BITWISE_OR;
- }
-
- if (c == '*'){
- if (d == '='){
- doread = true;
- return Token.OP_MULT_ASSIGN;
- }
- return Token.STAR;
- }
-
- if (c == '/'){
- if (d == '='){
- doread = true;
- return Token.OP_DIV_ASSIGN;
- }
- return Token.DIV;
- }
-
- if (c == '%'){
- if (d == '='){
- doread = true;
- return Token.OP_MOD_ASSIGN;
- }
- return Token.PERCENT;
- }
-
- if (c == '^'){
- if (d == '='){
- doread = true;
- return Token.OP_XOR_ASSIGN;
- }
- return Token.CARRET;
- }
-
- if (c == '<'){
- if (d == '<'){
- getChar ();
- d = peekChar ();
-
- if (d == '='){
- doread = true;
- return Token.OP_SHIFT_LEFT_ASSIGN;
- }
- return Token.OP_SHIFT_LEFT;
- } else if (d == '='){
- doread = true;
- return Token.OP_LE;
- }
- return Token.OP_LT;
- }
-
- if (c == '>'){
- if (d == '>'){
- getChar ();
- d = peekChar ();
-
- if (d == '='){
- doread = true;
- return Token.OP_SHIFT_RIGHT_ASSIGN;
- }
- return Token.OP_SHIFT_RIGHT;
- } else if (d == '='){
- doread = true;
- return Token.OP_GE;
- }
- return Token.OP_GT;
- }
- return Token.ERROR;
- }
-
- void Error_NumericConstantTooLong ()
- {
- Report.Error (1021, Location, "Numeric constant too long");
- }
-
- bool decimal_digits (int c)
- {
- int d;
- bool seen_digits = false;
-
- if (c != -1){
- if (number_pos == max_number_size)
- Error_NumericConstantTooLong ();
- number_builder [number_pos++] = (char) c;
- }
-
- //
- // We use peekChar2, because decimal_digits needs to do a
- // 2-character look-ahead (5.ToString for example).
- //
- while ((d = peekChar2 ()) != -1){
- if (d >= '0' && d <= '9'){
- if (number_pos == max_number_size)
- Error_NumericConstantTooLong ();
- number_builder [number_pos++] = (char) d;
- getChar ();
- seen_digits = true;
- } else
- break;
- }
-
- return seen_digits;
- }
-
- bool is_hex (int e)
- {
- return (e >= '0' && e <= '9') || (e >= 'A' && e <= 'F') || (e >= 'a' && e <= 'f');
- }
-
- void hex_digits (int c)
- {
- if (c != -1)
- number_builder [number_pos++] = (char) c;
-
- }
-
- int real_type_suffix (int c)
- {
- int t;
-
- switch (c){
- case 'F': case 'f':
- t = Token.LITERAL_FLOAT;
- break;
- case 'D': case 'd':
- t = Token.LITERAL_DOUBLE;
- break;
- case 'M': case 'm':
- t= Token.LITERAL_DECIMAL;
- break;
- default:
- return Token.NONE;
- }
- return t;
- }
-
- int integer_type_suffix (ulong ul, int c)
- {
- bool is_unsigned = false;
- bool is_long = false;
-
- if (c != -1){
- bool scanning = true;
- do {
- switch (c){
- case 'U': case 'u':
- if (is_unsigned)
- scanning = false;
- is_unsigned = true;
- getChar ();
- break;
-
- case 'l':
- if (!is_unsigned){
- //
- // if we have not seen anything in between
- // report this error
- //
- Report.Warning (
- 78, Location,
- "the 'l' suffix is easily confused with digit `1'," +
- " use 'L' for clarity");
- }
- goto case 'L';
-
- case 'L':
- if (is_long)
- scanning = false;
- is_long = true;
- getChar ();
- break;
-
- default:
- scanning = false;
- break;
- }
- c = peekChar ();
- } while (scanning);
- }
-
- if (is_long && is_unsigned){
- val = ul;
- return Token.LITERAL_INTEGER;
- } else if (is_unsigned){
- // uint if possible, or ulong else.
-
- if ((ul & 0xffffffff00000000) == 0)
- val = (uint) ul;
- else
- val = ul;
- } else if (is_long){
- // long if possible, ulong otherwise
- if ((ul & 0x8000000000000000) != 0)
- val = ul;
- else
- val = (long) ul;
- } else {
- // int, uint, long or ulong in that order
- if ((ul & 0xffffffff00000000) == 0){
- uint ui = (uint) ul;
-
- if ((ui & 0x80000000) != 0)
- val = ui;
- else
- val = (int) ui;
- } else {
- if ((ul & 0x8000000000000000) != 0)
- val = ul;
- else
- val = (long) ul;
- }
- }
- return Token.LITERAL_INTEGER;
- }
-
- //
- // given `c' as the next char in the input decide whether
- // we need to convert to a special type, and then choose
- // the best representation for the integer
- //
- int adjust_int (int c)
- {
- try {
- if (number_pos > 9){
- ulong ul = (uint) (number_builder [0] - '0');
-
- for (int i = 1; i < number_pos; i++){
- ul = checked ((ul * 10) + ((uint)(number_builder [i] - '0')));
- }
- return integer_type_suffix (ul, c);
- } else {
- uint ui = (uint) (number_builder [0] - '0');
-
- for (int i = 1; i < number_pos; i++){
- ui = checked ((ui * 10) + ((uint)(number_builder [i] - '0')));
- }
- return integer_type_suffix (ui, c);
- }
- } catch (OverflowException) {
- error_details = "Integral constant is too large";
- Report.Error (1021, Location, error_details);
- val = 0ul;
- return Token.LITERAL_INTEGER;
- }
- }
-
- int adjust_real (int t)
- {
- string s = new String (number_builder, 0, number_pos);
-
- switch (t){
- case Token.LITERAL_DECIMAL:
- try {
- val = System.Decimal.Parse (s, styles, csharp_format_info);
- } catch (OverflowException) {
- val = 0m;
- error_details = "Floating-point constant is outside the range of the type 'decimal'";
- Report.Error (594, Location, error_details);
- }
- break;
- case Token.LITERAL_FLOAT:
- try {
- val = (float) System.Double.Parse (s, styles, csharp_format_info);
- } catch (OverflowException) {
- val = 0.0f;
- error_details = "Floating-point constant is outside the range of the type 'float'";
- Report.Error (594, Location, error_details);
- }
- break;
-
- case Token.LITERAL_DOUBLE:
- case Token.NONE:
- t = Token.LITERAL_DOUBLE;
- try {
- val = System.Double.Parse (s, styles, csharp_format_info);
- } catch (OverflowException) {
- val = 0.0;
- error_details = "Floating-point constant is outside the range of the type 'double'";
- Report.Error (594, Location, error_details);
- }
- break;
- }
- return t;
- }
-
- int handle_hex ()
- {
- int d;
- ulong ul;
-
- getChar ();
- while ((d = peekChar ()) != -1){
- if (is_hex (d)){
- if (number_pos == 16){
- Report.Error (1021, Location, "Integral constant too large");
- return Token.ERROR;
- }
- number_builder [number_pos++] = (char) d;
- getChar ();
- } else
- break;
- }
-
- string s = new String (number_builder, 0, number_pos);
- if (number_pos <= 8)
- ul = System.UInt32.Parse (s, NumberStyles.HexNumber);
- else
- ul = System.UInt64.Parse (s, NumberStyles.HexNumber);
- return integer_type_suffix (ul, peekChar ());
- }
-
- //
- // Invoked if we know we have .digits or digits
- //
- int is_number (int c)
- {
- bool is_real = false;
- int type;
-
- number_pos = 0;
-
- if (c >= '0' && c <= '9'){
- if (c == '0'){
- int peek = peekChar ();
-
- if (peek == 'x' || peek == 'X')
- return handle_hex ();
- }
- decimal_digits (c);
- c = getChar ();
- }
-
- //
- // We need to handle the case of
- // "1.1" vs "1.string" (LITERAL_FLOAT vs NUMBER DOT IDENTIFIER)
- //
- if (c == '.'){
- if (decimal_digits ('.')){
- is_real = true;
- c = getChar ();
- } else {
- putback ('.');
- number_pos--;
- return adjust_int (-1);
- }
- }
-
- if (c == 'e' || c == 'E'){
- is_real = true;
- if (number_pos == max_number_size)
- Error_NumericConstantTooLong ();
- number_builder [number_pos++] = 'e';
- c = getChar ();
-
- if (c == '+'){
- if (number_pos == max_number_size)
- Error_NumericConstantTooLong ();
- number_builder [number_pos++] = '+';
- c = -1;
- } else if (c == '-') {
- if (number_pos == max_number_size)
- Error_NumericConstantTooLong ();
- number_builder [number_pos++] = '-';
- c = -1;
- } else {
- if (number_pos == max_number_size)
- Error_NumericConstantTooLong ();
- number_builder [number_pos++] = '+';
- }
-
- decimal_digits (c);
- c = getChar ();
- }
-
- type = real_type_suffix (c);
- if (type == Token.NONE && !is_real){
- putback (c);
- return adjust_int (c);
- } else
- is_real = true;
-
- if (type == Token.NONE){
- putback (c);
- }
-
- if (is_real)
- return adjust_real (type);
-
- Console.WriteLine ("This should not be reached");
- throw new Exception ("Is Number should never reach this point");
- }
-
- //
- // Accepts exactly count (4 or 8) hex, no more no less
- //
- int getHex (int count, out bool error)
- {
- int [] buffer = new int [8];
- int i;
- int total = 0;
- int c;
- int top = count != -1 ? count : 4;
-
- getChar ();
- error = false;
- for (i = 0; i < top; i++){
- c = getChar ();
-
- if (c >= '0' && c <= '9')
- c = (int) c - (int) '0';
- else if (c >= 'A' && c <= 'F')
- c = (int) c - (int) 'A' + 10;
- else if (c >= 'a' && c <= 'f')
- c = (int) c - (int) 'a' + 10;
- else {
- error = true;
- return 0;
- }
-
- total = (total * 16) + c;
- if (count == -1){
- int p = peekChar ();
- if (p == -1)
- break;
- if (!is_hex ((char)p))
- break;
- }
- }
- return total;
- }
-
- int escape (int c)
- {
- bool error;
- int d;
- int v;
-
- d = peekChar ();
- if (c != '\\')
- return c;
-
- switch (d){
- case 'a':
- v = '\a'; break;
- case 'b':
- v = '\b'; break;
- case 'n':
- v = '\n'; break;
- case 't':
- v = '\t'; break;
- case 'v':
- v = '\v'; break;
- case 'r':
- v = '\r'; break;
- case '\\':
- v = '\\'; break;
- case 'f':
- v = '\f'; break;
- case '0':
- v = 0; break;
- case '"':
- v = '"'; break;
- case '\'':
- v = '\''; break;
- case 'x':
- v = getHex (-1, out error);
- if (error)
- goto default;
- return v;
- case 'u':
- v = getHex (4, out error);
- if (error)
- goto default;
- return v;
- case 'U':
- v = getHex (8, out error);
- if (error)
- goto default;
- return v;
- default:
- Report.Error (1009, Location, "Unrecognized escape sequence in " + (char)d);
- return d;
- }
- getChar ();
- return v;
- }
-
- int getChar ()
- {
- if (putback_char != -1){
- int x = putback_char;
- putback_char = -1;
-
- return x;
- }
- return reader.Read ();
- }
-
- int peekChar ()
- {
- if (putback_char != -1)
- return putback_char;
- putback_char = reader.Read ();
- return putback_char;
- }
-
- int peekChar2 ()
- {
- if (putback_char != -1)
- return putback_char;
- return reader.Peek ();
- }
-
- void putback (int c)
- {
- if (putback_char != -1){
- Console.WriteLine ("Col: " + col);
- Console.WriteLine ("Row: " + line);
- Console.WriteLine ("Name: " + ref_name.Name);
- Console.WriteLine ("Current [{0}] putting back [{1}] ", putback_char, c);
- throw new Exception ("This should not happen putback on putback");
- }
- putback_char = c;
- }
-
- public bool advance ()
- {
- return peekChar () != -1;
- }
-
- public Object Value {
- get {
- return val;
- }
- }
-
- public Object value ()
- {
- return val;
- }
-
- public int token ()
- {
- current_token = xtoken ();
- return current_token;
- }
-
- static StringBuilder static_cmd_arg = new System.Text.StringBuilder ();
-
- void get_cmd_arg (out string cmd, out string arg)
- {
- int c;
-
- tokens_seen = false;
- arg = "";
- static_cmd_arg.Length = 0;
-
- while ((c = getChar ()) != -1 && (c != '\n') && (c != ' ') && (c != '\t') && (c != '\r')){
- static_cmd_arg.Append ((char) c);
- }
-
- cmd = static_cmd_arg.ToString ();
-
- if (c == '\n'){
- line++;
- ref_line++;
- return;
- } else if (c == '\r')
- col = 0;
-
- // skip over white space
- while ((c = getChar ()) != -1 && (c != '\n') && ((c == '\r') || (c == ' ') || (c == '\t')))
- ;
-
- if (c == '\n'){
- line++;
- ref_line++;
- return;
- } else if (c == '\r'){
- col = 0;
- return;
- }
-
- static_cmd_arg.Length = 0;
- static_cmd_arg.Append ((char) c);
-
- while ((c = getChar ()) != -1 && (c != '\n') && (c != '\r')){
- static_cmd_arg.Append ((char) c);
- }
-
- if (c == '\n'){
- line++;
- ref_line++;
- } else if (c == '\r')
- col = 0;
- arg = static_cmd_arg.ToString ().Trim ();
- }
-
- //
- // Handles the #line directive
- //
- bool PreProcessLine (string arg)
- {
- if (arg == "")
- return false;
-
- if (arg == "default"){
- ref_line = line;
- ref_name = file_name;
- Location.Push (ref_name);
- return true;
- }
-
- try {
- int pos;
-
- if ((pos = arg.IndexOf (' ')) != -1 && pos != 0){
- ref_line = System.Int32.Parse (arg.Substring (0, pos));
- pos++;
-
- char [] quotes = { '\"' };
-
- string name = arg.Substring (pos). Trim (quotes);
- ref_name = Location.LookupFile (name);
- Location.Push (ref_name);
- } else {
- ref_line = System.Int32.Parse (arg);
- }
-
- ref_line--;
- } catch {
- return false;
- }
-
- return true;
- }
-
- //
- // Handles #define and #undef
- //
- void PreProcessDefinition (bool is_define, string arg)
- {
- if (arg == "" || arg == "true" || arg == "false"){
- Report.Error (1001, Location, "Missing identifer to pre-processor directive");
- return;
- }
-
- char[] whitespace = { ' ', '\t' };
- if (arg.IndexOfAny (whitespace) != -1){
- Report.Error (1025, Location, "Single-line comment or end-of-line expected");
- return;
- }
-
- foreach (char c in arg){
- if (!Char.IsLetter (c) && (c != '_')){
- Report.Error (1001, Location, "Identifier expected");
- return;
- }
- }
-
- if (is_define){
- if (defines == null)
- defines = new Hashtable ();
- define (arg);
- } else {
- if (defines == null)
- return;
- if (defines.Contains (arg))
- defines.Remove (arg);
- }
- }
-
- bool eval_val (string s)
- {
- if (s == "true")
- return true;
- if (s == "false")
- return false;
-
- if (defines == null)
- return false;
- if (defines.Contains (s))
- return true;
-
- return false;
- }
-
- bool pp_primary (ref string s)
- {
- s = s.Trim ();
- int len = s.Length;
-
- if (len > 0){
- char c = s [0];
-
- if (c == '('){
- s = s.Substring (1);
- bool val = pp_expr (ref s);
- if (s.Length > 0 && s [0] == ')'){
- s = s.Substring (1);
- return val;
- }
- Error_InvalidDirective ();
- return false;
- }
-
- if (is_identifier_start_character (c)){
- int j = 1;
-
- while (j < len){
- c = s [j];
-
- if (is_identifier_part_character (c)){
- j++;
- continue;
- }
- bool v = eval_val (s.Substring (0, j));
- s = s.Substring (j);
- return v;
- }
- bool vv = eval_val (s);
- s = "";
- return vv;
- }
- }
- Error_InvalidDirective ();
- return false;
- }
-
- bool pp_unary (ref string s)
- {
- s = s.Trim ();
- int len = s.Length;
-
- if (len > 0){
- if (s [0] == '!'){
- if (len > 1 && s [1] == '='){
- Error_InvalidDirective ();
- return false;
- }
- s = s.Substring (1);
- return ! pp_primary (ref s);
- } else
- return pp_primary (ref s);
- } else {
- Error_InvalidDirective ();
- return false;
- }
- }
-
- bool pp_eq (ref string s)
- {
- bool va = pp_unary (ref s);
-
- s = s.Trim ();
- int len = s.Length;
- if (len > 0){
- if (s [0] == '='){
- if (len > 2 && s [1] == '='){
- s = s.Substring (2);
- return va == pp_unary (ref s);
- } else {
- Error_InvalidDirective ();
- return false;
- }
- } else if (s [0] == '!' && len > 1 && s [1] == '='){
- s = s.Substring (2);
-
- return va != pp_unary (ref s);
-
- }
- }
-
- return va;
-
- }
-
- bool pp_and (ref string s)
- {
- bool va = pp_eq (ref s);
-
- s = s.Trim ();
- int len = s.Length;
- if (len > 0){
- if (s [0] == '&'){
- if (len > 2 && s [1] == '&'){
- s = s.Substring (2);
- return (va & pp_eq (ref s));
- } else {
- Error_InvalidDirective ();
- return false;
- }
- }
- }
- return va;
- }
-
- //
- // Evaluates an expression for `#if' or `#elif'
- //
- bool pp_expr (ref string s)
- {
- bool va = pp_and (ref s);
- s = s.Trim ();
- int len = s.Length;
- if (len > 0){
- char c = s [0];
-
- if (c == '|'){
- if (len > 2 && s [1] == '|'){
- s = s.Substring (2);
- return va | pp_expr (ref s);
- } else {
- Error_InvalidDirective ();
- return false;
- }
- }
- }
-
- return va;
- }
-
- bool eval (string s)
- {
- bool v = pp_expr (ref s);
- s = s.Trim ();
- if (s.Length != 0){
- Error_InvalidDirective ();
- return false;
- }
-
- return v;
- }
-
- void Error_InvalidDirective ()
- {
- Report.Error (1517, Location, "Invalid pre-processor directive");
- }
-
- void Error_UnexpectedDirective (string extra)
- {
- Report.Error (
- 1028, Location,
- "Unexpected processor directive (" + extra + ")");
- }
-
- void Error_TokensSeen ()
- {
- Report.Error (
- 1032, Location,
- "Cannot define or undefine pre-processor symbols after a token in the file");
- }
-
- //
- // if true, then the code continues processing the code
- // if false, the code stays in a loop until another directive is
- // reached.
- //
- bool handle_preprocessing_directive (bool caller_is_taking)
- {
- char [] blank = { ' ', '\t' };
- string cmd, arg;
- bool region_directive = false;
-
- get_cmd_arg (out cmd, out arg);
-
- // Eat any trailing whitespaces and single-line comments
- if (arg.IndexOf ("//") != -1)
- arg = arg.Substring (0, arg.IndexOf ("//"));
- arg = arg.TrimEnd (' ', '\t');
-
- //
- // The first group of pre-processing instructions is always processed
- //
- switch (cmd){
- case "line":
- if (!PreProcessLine (arg))
- Report.Error (
- 1576, Location,
- "Argument to #line directive is missing or invalid");
- return true;
-
- case "region":
- region_directive = true;
- arg = "true";
- goto case "if";
-
- case "endregion":
- region_directive = true;
- goto case "endif";
-
- case "if":
- if (arg == ""){
- Error_InvalidDirective ();
- return true;
- }
- bool taking = false;
- if (ifstack == null)
- ifstack = new Stack ();
-
- if (ifstack.Count == 0){
- taking = true;
- } else {
- int state = (int) ifstack.Peek ();
- if ((state & TAKING) != 0)
- taking = true;
- }
-
- if (eval (arg) && taking){
- int push = TAKING | TAKEN_BEFORE | PARENT_TAKING;
- if (region_directive)
- push |= REGION;
- ifstack.Push (push);
- return true;
- } else {
- int push = (taking ? PARENT_TAKING : 0);
- if (region_directive)
- push |= REGION;
- ifstack.Push (push);
- return false;
- }
-
- case "endif":
- if (ifstack == null || ifstack.Count == 0){
- Error_UnexpectedDirective ("no #if for this #endif");
- return true;
- } else {
- int pop = (int) ifstack.Pop ();
-
- if (region_directive && ((pop & REGION) == 0))
- Report.Error (1027, Location, "#endif directive expected");
- else if (!region_directive && ((pop & REGION) != 0))
- Report.Error (1038, Location, "#endregion directive expected");
-
- if (ifstack.Count == 0)
- return true;
- else {
- int state = (int) ifstack.Peek ();
-
- if ((state & TAKING) != 0)
- return true;
- else
- return false;
- }
- }
-
- case "elif":
- if (ifstack == null || ifstack.Count == 0){
- Error_UnexpectedDirective ("no #if for this #elif");
- return true;
- } else {
- int state = (int) ifstack.Peek ();
-
- if ((state & REGION) != 0) {
- Report.Error (1038, Location, "#endregion directive expected");
- return true;
- }
-
- if ((state & ELSE_SEEN) != 0){
- Error_UnexpectedDirective ("#elif not valid after #else");
- return true;
- }
-
- if ((state & (TAKEN_BEFORE | TAKING)) != 0)
- return false;
-
- if (eval (arg) && ((state & PARENT_TAKING) != 0)){
- state = (int) ifstack.Pop ();
- ifstack.Push (state | TAKING | TAKEN_BEFORE);
- return true;
- } else
- return false;
- }
-
- case "else":
- if (ifstack == null || ifstack.Count == 0){
- Report.Error (
- 1028, Location,
- "Unexpected processor directive (no #if for this #else)");
- return true;
- } else {
- int state = (int) ifstack.Peek ();
-
- if ((state & REGION) != 0) {
- Report.Error (1038, Location, "#endregion directive expected");
- return true;
- }
-
- if ((state & ELSE_SEEN) != 0){
- Error_UnexpectedDirective ("#else within #else");
- return true;
- }
-
- ifstack.Pop ();
-
- bool ret;
- if ((state & TAKEN_BEFORE) == 0){
- ret = ((state & PARENT_TAKING) != 0);
- } else
- ret = false;
-
- if (ret)
- state |= TAKING;
- else
- state &= ~TAKING;
-
- ifstack.Push (state | ELSE_SEEN);
-
- return ret;
- }
- }
-
- //
- // These are only processed if we are in a `taking' block
- //
- if (!caller_is_taking)
- return false;
-
- switch (cmd){
- case "define":
- if (any_token_seen){
- Error_TokensSeen ();
- return true;
- }
- PreProcessDefinition (true, arg);
- return true;
-
- case "undef":
- if (any_token_seen){
- Error_TokensSeen ();
- return true;
- }
- PreProcessDefinition (false, arg);
- return true;
-
- case "error":
- Report.Error (1029, Location, "#error: '" + arg + "'");
- return true;
-
- case "warning":
- Report.Warning (1030, Location, "#warning: '" + arg + "'");
- return true;
- }
-
- Report.Error (1024, Location, "Preprocessor directive expected (got: " + cmd + ")");
- return true;
-
- }
-
- private int consume_string (bool quoted)
- {
- int c;
- string_builder.Length = 0;
-
- while ((c = getChar ()) != -1){
- if (c == '"'){
- if (quoted && peekChar () == '"'){
- string_builder.Append ((char) c);
- getChar ();
- continue;
- } else {
- val = string_builder.ToString ();
- return Token.LITERAL_STRING;
- }
- }
-
- if (c == '\n'){
- if (!quoted)
- Report.Error (1010, Location, "Newline in constant");
- line++;
- ref_line++;
- col = 0;
- } else
- col++;
-
- if (!quoted){
- c = escape (c);
- if (c == -1)
- return Token.ERROR;
- }
- string_builder.Append ((char) c);
- }
-
- Report.Error (1039, Location, "Unterminated string literal");
- return Token.EOF;
- }
-
- private int consume_identifier (int s, bool quoted)
- {
- int pos = 1;
- int c;
-
- id_builder [0] = (char) s;
-
- while ((c = reader.Read ()) != -1) {
- if (is_identifier_part_character ((char) c)){
- if (pos == max_id_size){
- Report.Error (645, Location, "Identifier too long (limit is 512 chars)");
- return Token.ERROR;
- }
-
- id_builder [pos++] = (char) c;
- putback_char = -1;
- col++;
- } else {
- putback_char = c;
- break;
- }
- }
-
- string ids = new String (id_builder, 0, pos);
-
- if (s >= 'a'){
- int keyword = GetKeyword (ids);
- if (keyword == -1 || quoted){
- val = ids;
- return Token.IDENTIFIER;
- }
- return keyword;
- }
- val = ids;
- return Token.IDENTIFIER;
- }
-
- public int xtoken ()
- {
- int t;
- bool doread = false;
- int c;
-
- val = null;
- // optimization: eliminate col and implement #directive semantic correctly.
- for (;(c = getChar ()) != -1; col++) {
- if (c == ' ' || c == '\t' || c == '\f' || c == '\v' || c == '\r' || c == 0xa0){
-
- if (c == '\t')
- col = (((col + 8) / 8) * 8) - 1;
- continue;
- }
-
- // Handle double-slash comments.
- if (c == '/'){
- int d = peekChar ();
-
- if (d == '/'){
- getChar ();
- // Modified by Gaurav Vaish
- while ((d = getChar ()) != -1 && (d != '\n') && d != '\r')
- {
- commentString += (char)d;
- col++;
- }
- if (d == '\n'){
- commentString += '\n';
- line++;
- ref_line++;
- col = 0;
- }
- any_token_seen |= tokens_seen;
- tokens_seen = false;
- continue;
- } else if (d == '*'){
- getChar ();
-
- while ((d = getChar ()) != -1){
- if (d == '*' && peekChar () == '/'){
- getChar ();
- col++;
- break;
- }
- commentString += (char)d;
- if (d == '\n'){
- commentString += '\n';
- line++;
- ref_line++;
- col = 0;
- any_token_seen |= tokens_seen;
- tokens_seen = false;
- }
- }
- continue;
- }
- goto is_punct_label;
- }
-
-
- if (is_identifier_start_character ((char)c)){
- tokens_seen = true;
- return consume_identifier (c, false);
- }
-
- is_punct_label:
- if ((t = is_punct ((char)c, ref doread)) != Token.ERROR){
- tokens_seen = true;
- if (doread){
- getChar ();
- col++;
- }
- return t;
- }
-
- // white space
- if (c == '\n'){
- line++;
- ref_line++;
- col = 0;
- any_token_seen |= tokens_seen;
- tokens_seen = false;
- continue;
- }
-
- if (c >= '0' && c <= '9'){
- tokens_seen = true;
- return is_number (c);
- }
-
- if (c == '.'){
- tokens_seen = true;
- int peek = peekChar ();
- if (peek >= '0' && peek <= '9')
- return is_number (c);
- return Token.DOT;
- }
-
- /* For now, ignore pre-processor commands */
- // FIXME: In C# the '#' is not limited to appear
- // on the first column.
- if (c == '#' && !tokens_seen){
- bool cont = true;
-
- start_again:
-
- cont = handle_preprocessing_directive (cont);
-
- if (cont){
- col = 0;
- continue;
- }
- col = 1;
-
- bool skipping = false;
- for (;(c = getChar ()) != -1; col++){
- if (c == '\n'){
- col = 0;
- line++;
- ref_line++;
- skipping = false;
- } else if (c == ' ' || c == '\t' || c == '\v' || c == '\r' || c == 0xa0)
- continue;
- else if (c != '#')
- skipping = true;
- if (c == '#' && !skipping)
- goto start_again;
- }
- any_token_seen |= tokens_seen;
- tokens_seen = false;
- if (c == -1)
- Report.Error (1027, Location, "#endif/#endregion expected");
- continue;
- }
-
- if (c == '"')
- return consume_string (false);
-
- if (c == '\''){
- c = getChar ();
- tokens_seen = true;
- if (c == '\''){
- error_details = "Empty character literal";
- Report.Error (1011, Location, error_details);
- return Token.ERROR;
- }
- c = escape (c);
- if (c == -1)
- return Token.ERROR;
- val = new System.Char ();
- val = (char) c;
- c = getChar ();
-
- if (c != '\''){
- error_details = "Too many characters in character literal";
- Report.Error (1012, Location, error_details);
-
- // Try to recover, read until newline or next "'"
- while ((c = getChar ()) != -1){
- if (c == '\n' || c == '\''){
- line++;
- ref_line++;
- col = 0;
- break;
- } else
- col++;
-
- }
- return Token.ERROR;
- }
- return Token.LITERAL_CHARACTER;
- }
-
- if (c == '@') {
- c = getChar ();
- if (c == '"') {
- tokens_seen = true;
- return consume_string (true);
- } else if (is_identifier_start_character ((char) c)){
- return consume_identifier (c, true);
- } else {
- Report.Error (1033, Location, "'@' must be followed by string constant or identifier");
- }
- }
-
- error_details = ((char)c).ToString ();
-
- return Token.ERROR;
- }
-
- return Token.EOF;
- }
-
- public void cleanup ()
- {
- if (ifstack != null && ifstack.Count >= 1) {
- int state = (int) ifstack.Pop ();
- if ((state & REGION) != 0)
- Report.Error (1038, "#endregion directive expected");
- else
- Report.Error (1027, "#endif directive expected");
- }
-
- }
-
- }
-}
-
+//
+// cs-tokenizer.cs: The Tokenizer for the C# compiler
+// This also implements the preprocessor
+//
+// Author: Miguel de Icaza (mi...@gn...)
+//
+// Licensed under the terms of the GNU GPL
+//
+// (C) 2001, 2002 Ximian, Inc (http://www.ximian.com)
+//
+
+/*
+ * TODO:
+ * Make sure we accept the proper Unicode ranges, per the spec.
+ * Report error 1032
+*/
+
+using System;
+using System.Text;
+using System.Collections;
+using System.IO;
+using System.Globalization;
+using System.Reflection;
+
+namespace Mono.CSharp
+{
+ /// <summary>
+ /// Tokenizer for C# source code.
+ /// </summary>
+
+ public class Tokenizer : yyParser.yyInput
+ {
+ StreamReader reader;
+ public SourceFile ref_name;
+ public SourceFile file_name;
+ public int ref_line = 1;
+ public int line = 1;
+ public int col = 1;
+ public int current_token;
+ bool handle_get_set = false;
+ bool handle_remove_add = false;
+ bool handle_assembly = false;
+
+ //
+ // Whether tokens have been seen on this line
+ //
+ bool tokens_seen = false;
+
+ //
+ // Whether a token has been seen on the file
+ // This is needed because `define' is not allowed to be used
+ // after a token has been seen.
+ //
+ bool any_token_seen = false;
+ static Hashtable tokenValues;
+
+ // Adding support for documentation.
+ // Modified by Gaurav Vaish
+
+ private Hashtable documentationStrings = new Hashtable();
+ private string commentString = "";
+
+ public void SaveDocumentFor(object new_class)
+ {
+ //if(!documentationStrings.ContainsKey(new_class))
+ documentationStrings[new_class] = commentString;
+ //System.Console.WriteLine("Document for {0}:\n\n{1}", new_class.ToString(), commentString);
+ commentString = "";
+ }
+
+ public Hashtable Documentation
+ {
+ get
+ {
+ return documentationStrings;
+ }
+ }
+
+ private static Hashtable TokenValueName
+ {
+ get {
+ if (tokenValues == null)
+ tokenValues = GetTokenValueNameHash ();
+
+ return tokenValues;
+ }
+ }
+
+ private static Hashtable GetTokenValueNameHash ()
+ {
+ Type t = typeof (Token);
+ FieldInfo [] fields = t.GetFields ();
+ Hashtable hash = new Hashtable ();
+ foreach (FieldInfo field in fields) {
+ if (field.IsLiteral && field.IsStatic && field.FieldType == typeof (int))
+ hash.Add (field.GetValue (null), field.Name);
+ }
+ return hash;
+ }
+
+ //
+ // Returns a verbose representation of the current location
+ //
+ public string location {
+ get {
+ string det;
+
+ if (current_token == Token.ERROR)
+ det = "detail: " + error_details;
+ else
+ det = "";
+
+ // return "Line: "+line+" Col: "+col + "\n" +
+ // "VirtLine: "+ref_line +
+ // " Token: "+current_token + " " + det;
+ string current_token_name = TokenValueName [current_token] as string;
+ if (current_token_name == null)
+ current_token_name = current_token.ToString ();
+
+ return String.Format ("{0} ({1},{2}), Token: {3} {4}", ref_name.Name,
+ ref_line,
+ col,
+ current_token_name,
+ det);
+ }
+ }
+
+ public bool PropertyParsing {
+ get {
+ return handle_get_set;
+ }
+
+ set {
+ handle_get_set = value;
+ }
+ }
+
+ public bool AssemblyTargetParsing {
+ get {
+ return handle_assembly;
+ }
+
+ set {
+ handle_assembly = value;
+ }
+ }
+
+ public bool EventParsing {
+ get {
+ return handle_remove_add;
+ }
+
+ set {
+ handle_remove_add = value;
+ }
+ }
+
+ //
+ // Class variables
+ //
+ static Hashtable keywords;
+ static NumberStyles styles;
+ static NumberFormatInfo csharp_format_info;
+
+ //
+ // Values for the associated token returned
+ //
+ int putback_char;
+ Object val;
+
+ //
+ // Pre-processor
+ //
+ Hashtable defines;
+
+ const int TAKING = 1;
+ const int TAKEN_BEFORE = 2;
+ const int ELSE_SEEN = 4;
+ const int PARENT_TAKING = 8;
+ const int REGION = 16;
+
+ //
+ // pre-processor if stack state:
+ //
+ Stack ifstack;
+
+ static System.Text.StringBuilder string_builder;
+
+ const int max_id_size = 512;
+ static char [] id_builder = new char [max_id_size];
+
+ const int max_number_size = 128;
+ static char [] number_builder = new char [max_number_size];
+ static int number_pos;
+
+ //
+ // Details about the error encoutered by the tokenizer
+ //
+ string error_details;
+
+ public string error {
+ get {
+ return error_details;
+ }
+ }
+
+ public int Line {
+ get {
+ return ref_line;
+ }
+ }
+
+ public int Col {
+ get {
+ return col;
+ }
+ }
+
+ static void InitTokens ()
+ {
+ keywords = new Hashtable ();
+
+ keywords.Add ("abstract", Token.ABSTRACT);
+ keywords.Add ("as", Token.AS);
+ keywords.Add ("add", Token.ADD);
+ keywords.Add ("assembly", Token.ASSEMBLY);
+ keywords.Add ("base", Token.BASE);
+ keywords.Add ("bool", Token.BOOL);
+ keywords.Add ("break", Token.BREAK);
+ keywords.Add ("byte", Token.BYTE);
+ keywords.Add ("case", Token.CASE);
+ keywords.Add ("catch", Token.CATCH);
+ keywords.Add ("char", Token.CHAR);
+ keywords.Add ("checked", Token.CHECKED);
+ keywords.Add ("class", Token.CLASS);
+ keywords.Add ("const", Token.CONST);
+ keywords.Add ("continue", Token.CONTINUE);
+ keywords.Add ("decimal", Token.DECIMAL);
+ keywords.Add ("default", Token.DEFAULT);
+ keywords.Add ("delegate", Token.DELEGATE);
+ keywords.Add ("do", Token.DO);
+ keywords.Add ("double", Token.DOUBLE);
+ keywords.Add ("else", Token.ELSE);
+ keywords.Add ("enum", Token.ENUM);
+ keywords.Add ("event", Token.EVENT);
+ keywords.Add ("explicit", Token.EXPLICIT);
+ keywords.Add ("extern", Token.EXTERN);
+ keywords.Add ("false", Token.FALSE);
+ keywords.Add ("finally", Token.FINALLY);
+ keywords.Add ("fixed", Token.FIXED);
+ keywords.Add ("float", Token.FLOAT);
+ keywords.Add ("for", Token.FOR);
+ keywords.Add ("foreach", Token.FOREACH);
+ keywords.Add ("goto", Token.GOTO);
+ keywords.Add ("get", Token.GET);
+ keywords.Add ("if", Token.IF);
+ keywords.Add ("implicit", Token.IMPLICIT);
+ keywords.Add ("in", Token.IN);
+ keywords.Add ("int", Token.INT);
+ keywords.Add ("interface", Token.INTERFACE);
+ keywords.Add ("internal", Token.INTERNAL);
+ keywords.Add ("is", Token.IS);
+ keywords.Add ("lock", Token.LOCK);
+ keywords.Add ("long", Token.LONG);
+ keywords.Add ("namespace", Token.NAMESPACE);
+ keywords.Add ("new", Token.NEW);
+ keywords.Add ("null", Token.NULL);
+ keywords.Add ("object", Token.OBJECT);
+ keywords.Add ("operator", Token.OPERATOR);
+ keywords.Add ("out", Token.OUT);
+ keywords.Add ("override", Token.OVERRIDE);
+ keywords.Add ("params", Token.PARAMS);
+ keywords.Add ("private", Token.PRIVATE);
+ keywords.Add ("protected", Token.PROTECTED);
+ keywords.Add ("public", Token.PUBLIC);
+ keywords.Add ("readonly", Token.READONLY);
+ keywords.Add ("ref", Token.REF);
+ keywords.Add ("remove", Token.REMOVE);
+ keywords.Add ("return", Token.RETURN);
+ keywords.Add ("sbyte", Token.SBYTE);
+ keywords.Add ("sealed", Token.SEALED);
+ keywords.Add ("set", Token.SET);
+ keywords.Add ("short", Token.SHORT);
+ keywords.Add ("sizeof", Token.SIZEOF);
+ keywords.Add ("stackalloc", Token.STACKALLOC);
+ keywords.Add ("static", Token.STATIC);
+ keywords.Add ("string", Token.STRING);
+ keywords.Add ("struct", Token.STRUCT);
+ keywords.Add ("switch", Token.SWITCH);
+ keywords.Add ("this", Token.THIS);
+ keywords.Add ("throw", Token.THROW);
+ keywords.Add ("true", Token.TRUE);
+ keywords.Add ("try", Token.TRY);
+ keywords.Add ("typeof", Token.TYPEOF);
+ keywords.Add ("uint", Token.UINT);
+ keywords.Add ("ulong", Token.ULONG);
+ keywords.Add ("unchecked", Token.UNCHECKED);
+ keywords.Add ("unsafe", Token.UNSAFE);
+ keywords.Add ("ushort", Token.USHORT);
+ keywords.Add ("using", Token.USING);
+ keywords.Add ("virtual", Token.VIRTUAL);
+ keywords.Add ("void", Token.VOID);
+ keywords.Add ("volatile", Token.VOLATILE);
+ keywords.Add ("while", Token.WHILE);
+ }
+
+ //
+ // Class initializer
+ //
+ static Tokenizer ()
+ {
+ InitTokens ();
+ csharp_format_info = NumberFormatInfo.InvariantInfo;
+ styles = NumberStyles.Float;
+
+ string_builder = new System.Text.StringBuilder ();
+ }
+
+ int GetKeyword (string name)
+ {
+ object o = keywords [name];
+
+ if (o == null)
+ return -1;
+
+ int res = (int) o;
+
+ if (handle_get_set == false && (res == Token.GET || res == Token.SET))
+ return -1;
+ if (handle_remove_add == false && (res == Token.REMOVE || res == Token.ADD))
+ return -1;
+ if (handle_assembly == false && res == Token.ASSEMBLY)
+ return -1;
+ return res;
+
+ }
+
+ public Location Location {
+ get {
+ return new Location (ref_line);
+ }
+ }
+
+ void define (string def)
+ {
+ if (!RootContext.AllDefines.Contains (def)){
+ RootContext.AllDefines [def] = true;
+ }
+ if (defines.Contains (def))
+ return;
+ defines [def] = true;
+ }
+
+ public Tokenizer (StreamReader input, SourceFile file, ArrayList defs)
+ {
+ this.ref_name = file;
+ this.file_name = file;
+ reader = input;
+
+ putback_char = -1;
+
+ if (defs != null){
+ defines = new Hashtable ();
+ foreach (string def in defs)
+ define (def);
+ }
+
+ //
+ // FIXME: This could be `Location.Push' but we have to
+ // find out why the MS compiler allows this
+ //
+ Mono.CSharp.Location.Push (file);
+ }
+
+ bool is_identifier_start_character (char c)
+ {
+ return (c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z') || c == '_' || Char.IsLetter (c);
+ }
+
+ bool is_identifier_part_character (char c)
+ {
+ return (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || c == '_' || (c >= '0' && c <= '9') || Char.IsLetter (c);
+ }
+
+ int is_punct (char c, ref bool doread)
+ {
+ int d;
+ int t;
+
+ doread = false;
+
+ switch (c){
+ case '{':
+ return Token.OPEN_BRACE;
+ case '}':
+ return Token.CLOSE_BRACE;
+ case '[':
+ return Token.OPEN_BRACKET;
+ case ']':
+ return Token.CLOSE_BRACKET;
+ case '(':
+ return Token.OPEN_PARENS;
+ case ')':
+ return Token.CLOSE_PARENS;
+ case ',':
+ return Token.COMMA;
+ case ':':
+ return Token.COLON;
+ case ';':
+ return Token.SEMICOLON;
+ case '~':
+ return Token.TILDE;
+ case '?':
+ return Token.INTERR;
+ }
+
+ d = peekChar ();
+ if (c == '+'){
+
+ if (d == '+')
+ t = Token.OP_INC;
+ else if (d == '=')
+ t = Token.OP_ADD_ASSIGN;
+ else
+ return Token.PLUS;
+ doread = true;
+ return t;
+ }
+ if (c == '-'){
+ if (d == '-')
+ t = Token.OP_DEC;
+ else if (d == '=')
+ t = Token.OP_SUB_ASSIGN;
+ else if (d == '>')
+ t = Token.OP_PTR;
+ else
+ return Token.MINUS;
+ doread = true;
+ return t;
+ }
+
+ if (c == '!'){
+ if (d == '='){
+ doread = true;
+ return Token.OP_NE;
+ }
+ return Token.BANG;
+ }
+
+ if (c == '='){
+ if (d == '='){
+ doread = true;
+ return Token.OP_EQ;
+ }
+ return Token.ASSIGN;
+ }
+
+ if (c == '&'){
+ if (d == '&'){
+ doread = true;
+ return Token.OP_AND;
+ } else if (d == '='){
+ doread = true;
+ return Token.OP_AND_ASSIGN;
+ }
+ return Token.BITWISE_AND;
+ }
+
+ if (c == '|'){
+ if (d == '|'){
+ doread = true;
+ return Token.OP_OR;
+ } else if (d == '='){
+ doread = true;
+ return Token.OP_OR_ASSIGN;
+ }
+ return Token.BITWISE_OR;
+ }
+
+ if (c == '*'){
+ if (d == '='){
+ doread = true;
+ return Token.OP_MULT_ASSIGN;
+ }
+ return Token.STAR;
+ }
+
+ if (c == '/'){
+ if (d == '='){
+ doread = true;
+ return Token.OP_DIV_ASSIGN;
+ }
+ return Token.DIV;
+ }
+
+ if (c == '%'){
+ if (d == '='){
+ doread = true;
+ return Token.OP_MOD_ASSIGN;
+ }
+ return Token.PERCENT;
+ }
+
+ if (c == '^'){
+ if (d == '='){
+ doread = true;
+ return Token.OP_XOR_ASSIGN;
+ }
+ return Token.CARRET;
+ }
+
+ if (c == '<'){
+ if (d == '<'){
+ ...
[truncated message content] |
|
From: Gaurav V. <mas...@us...> - 2003-02-20 13:52:21
|
Update of /cvsroot/csdoc/csdoc/src/tests
In directory sc8-pr-cvs1:/tmp/cvs-serv8512
Modified Files:
ChangeLog
Added Files:
test_04.cs test_05.cs test_06.cs
Log Message:
2003-02-20
* test_04.cs,
* test_05.cs,
* test_06.cs : Added new tests.
--- NEW FILE ---
using System;
public class test_04
{
/// A const
public const string cnst04 = "Hello";
}
--- NEW FILE ---
using System;
public class test_05 : Exception
{
// Default ctor
public test_05() : base()
{
}
// ctor with message
public test_05(string message) : base(message)
{
}
}
--- NEW FILE ---
using System;
/**
* <summary>test_06</summary>
*/
public interface test_06
{
/// <summary>Returns M1</summary>
int GetM1();
/// <summary>Gets or Sets P1</summary>
int /* Nuisance */ P1 { get; set; }
}
Index: ChangeLog
===================================================================
RCS file: /cvsroot/csdoc/csdoc/src/tests/ChangeLog,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ChangeLog 20 Feb 2003 06:57:38 -0000 1.2
+++ ChangeLog 20 Feb 2003 13:52:18 -0000 1.3
@@ -1,6 +1,12 @@
2003-02-20 Gaurav Vaish <mastergaurav AT users DOT sf DOT net>
+ * test_04.cs,
+ * test_05.cs,
+ * test_06.cs : Added new tests.
+
+2003-02-20 Gaurav Vaish <mastergaurav AT users DOT sf DOT net>
+
* test_02.cs. test_03.cs : Added new tests.
2003-02-20 Gaurav Vaish <mastergaurav AT users DOT sf DOT net>
|
|
From: Gaurav V. <mas...@us...> - 2003-02-20 06:57:42
|
Update of /cvsroot/csdoc/csdoc/src/tests
In directory sc8-pr-cvs1:/tmp/cvs-serv32757
Modified Files:
ChangeLog test_01.cs
Added Files:
test_02.cs test_03.cs
Log Message:
2003-02-20
* test_02.cs. test_03.cs : Added new tests.
--- NEW FILE ---
using System;
/**
* <summary>test_02</summary>
*/
public class test_02
{
// Comment over test_02::Main(String[] args)
// How does it work?
public static void Main(string[] args)
{
System.Console.WriteLine("Inside Main...");
}
}
--- NEW FILE ---
using System;
/**
* <summary>test_03</summary>
*/
public class test_03
{
// Comment over test_03::Arbit(alpha[] args)
// How does it work?
public static void Arbit(alpha[] a, beta b)
{
System.Console.WriteLine("Inside Main...");
}
}
Index: ChangeLog
===================================================================
RCS file: /cvsroot/csdoc/csdoc/src/tests/ChangeLog,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ChangeLog 20 Feb 2003 05:48:30 -0000 1.1
+++ ChangeLog 20 Feb 2003 06:57:38 -0000 1.2
@@ -1,5 +1,9 @@
2003-02-20 Gaurav Vaish <mastergaurav AT users DOT sf DOT net>
+ * test_02.cs. test_03.cs : Added new tests.
+
+2003-02-20 Gaurav Vaish <mastergaurav AT users DOT sf DOT net>
+
* test.cs, test_01.cs : Test files.
Index: test_01.cs
===================================================================
RCS file: /cvsroot/csdoc/csdoc/src/tests/test_01.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- test_01.cs 20 Feb 2003 05:48:30 -0000 1.1
+++ test_01.cs 20 Feb 2003 06:57:38 -0000 1.2
@@ -1,19 +1,20 @@
using System;
/**
- * <summary>Hello</summary>
+ * <summary>test_01</summary>
*/
public class test_01
{
- // Comment over HandleTest
+ // Comment over test_01::HandleTest
public event EventHandler HandleTest
{
add { }
remove { }
}
- // Comment over Main()...
+ // Comment over test_01::Main()...
public static void Main()
{
+ System.Console.WriteLine("Inside Main...");
}
}
|
|
From: Gaurav V. <mas...@us...> - 2003-02-20 05:48:35
|
Update of /cvsroot/csdoc/csdoc/src/tests
In directory sc8-pr-cvs1:/tmp/cvs-serv12216
Modified Files:
test.cs
Added Files:
ChangeLog test_01.cs
Removed Files:
test-01.cs
Log Message:
2003-02-20
* test.cs, test_01.cs : Test files.
--- NEW FILE ---
2003-02-20 Gaurav Vaish <mastergaurav AT users DOT sf DOT net>
* test.cs, test_01.cs : Test files.
--- NEW FILE ---
using System;
/**
* <summary>Hello</summary>
*/
public class test_01
{
// Comment over HandleTest
public event EventHandler HandleTest
{
add { }
remove { }
}
// Comment over Main()...
public static void Main()
{
}
}
Index: test.cs
===================================================================
RCS file: /cvsroot/csdoc/csdoc/src/tests/test.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- test.cs 18 Feb 2003 11:51:11 -0000 1.1
+++ test.cs 20 Feb 2003 05:48:30 -0000 1.2
@@ -3,7 +3,7 @@
/**
* <summary>Hello</summary>
*/
-public class Test
+public class test
{
// Can I collect the Main comment?
public event EventHandler HandleTest
--- test-01.cs DELETED ---
|
|
From: Gaurav V. <mas...@us...> - 2003-02-20 05:40:20
|
Update of /cvsroot/csdoc/csdoc/src/csdoc
In directory sc8-pr-cvs1:/tmp/cvs-serv9928
Modified Files:
ChangeLog cs-parser.jay cs-tokenizer.cs
Log Message:
2003-02-20
* cs-parser.jay : Comment the bogus output.
* cs-tokenizer.cs : Don't remove the '\n' from comment.
Index: ChangeLog
===================================================================
RCS file: /cvsroot/csdoc/csdoc/src/csdoc/ChangeLog,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ChangeLog 19 Feb 2003 14:05:25 -0000 1.2
+++ ChangeLog 20 Feb 2003 05:40:17 -0000 1.3
@@ -1,4 +1,9 @@
+2003-02-20 Gaurav Vaish <mastergaurav AT users DOT sf DOT net>
+
+ * cs-parser.jay : Comment the bogus output.
+ * cs-tokenizer.cs : Don't remove the '\n' from comment.
+
2003-02-19 Gaurav Vaish <mastergaurav AT users DOT sf DOT net>
* driver.cs : Remove bogus part.
Index: cs-parser.jay
===================================================================
RCS file: /cvsroot/csdoc/csdoc/src/csdoc/cs-parser.jay,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- cs-parser.jay 19 Feb 2003 05:50:12 -0000 1.1
+++ cs-parser.jay 20 Feb 2003 05:40:17 -0000 1.2
@@ -830,7 +830,6 @@
method.Block = (Block) $2;
CheckDef (current_container.AddMethod (method), method.Name, method.Location);
- lexer.SaveDocumentFor(method);
current_local_parameters = null;
}
@@ -865,6 +864,10 @@
Method method = new Method ((Expression) $3, (int) $2, (string) $4,
(Parameters) $6, (Attributes) $1, lexer.Location);
+ //System.Console.WriteLine("MethodName : " + method.Name);
+ //System.Console.WriteLine("LexerLocation : " + lexer.Location.Row);
+ //System.Console.WriteLine("MethodLocation: " + method.Location.Row);
+ lexer.SaveDocumentFor(method);
current_local_parameters = (Parameters) $6;
$$ = method;
Index: cs-tokenizer.cs
===================================================================
RCS file: /cvsroot/csdoc/csdoc/src/csdoc/cs-tokenizer.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- cs-tokenizer.cs 19 Feb 2003 05:50:12 -0000 1.1
+++ cs-tokenizer.cs 20 Feb 2003 05:40:17 -0000 1.2
@@ -1627,6 +1627,7 @@
col++;
}
if (d == '\n'){
+ commentString += '\n';
line++;
ref_line++;
col = 0;
@@ -1645,6 +1646,7 @@
}
commentString += (char)d;
if (d == '\n'){
+ commentString += '\n';
line++;
ref_line++;
col = 0;
|
|
From: Gaurav V. <mas...@us...> - 2003-02-19 14:56:12
|
Update of /cvsroot/csdoc/csdoc
In directory sc8-pr-cvs1:/tmp/cvs-serv2164
Modified Files:
AUTHORS
Log Message:
2003-02-19
* AUTHORS: Special Thanks!
Index: AUTHORS
===================================================================
RCS file: /cvsroot/csdoc/csdoc/AUTHORS,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- AUTHORS 18 Feb 2003 11:42:53 -0000 1.1
+++ AUTHORS 19 Feb 2003 14:56:08 -0000 1.2
@@ -14,3 +14,8 @@
* Special Thanks:
Paolo Molaro <lupus AT ximian DOT com>
+
+ while(true)
+ {
+ ThanksTo("Paolo Molaro");
+ }
|
|
From: Gaurav V. <mas...@us...> - 2003-02-19 14:05:30
|
Update of /cvsroot/csdoc/csdoc/src/csdoc
In directory sc8-pr-cvs1:/tmp/cvs-serv12037
Modified Files:
AssemblyInfo.cs ChangeLog driver.cs
Log Message:
2003-02-19
* driver.cs : Remove bogus part.
* AssemblyInfo.cs : Updated for csdoc.
Index: AssemblyInfo.cs
===================================================================
RCS file: /cvsroot/csdoc/csdoc/src/csdoc/AssemblyInfo.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- AssemblyInfo.cs 19 Feb 2003 05:50:11 -0000 1.1
+++ AssemblyInfo.cs 19 Feb 2003 14:05:25 -0000 1.2
@@ -1,8 +1,10 @@
using System.Reflection;
using System.Runtime.CompilerServices;
-[assembly: AssemblyVersion("0.19.1")]
-[assembly: AssemblyTitle ("Mono C# Compiler")]
-[assembly: AssemblyDescription ("Mono C# Compiler")]
-[assembly: AssemblyCopyright ("2001, 2002 Ximian, Inc.")]
-[assembly: AssemblyCompany ("Ximian, Inc.")]
+[assembly: AssemblyVersion("0.2.*")]
+[assembly: AssemblyFileVersion("0.2.0")]
+[assembly: AssemblyTitle ("C# Document Generator")]
+[assembly: AssemblyDescription ("C# Document Generator")]
+[assembly: AssemblyCopyright ("(C) 2003, Gaurav Vaish")]
+[assembly: AssemblyCompany ("http://csdoc.sourceforge.net/")]
+[assembly: AssemblyProduct("CSDoc")]
Index: ChangeLog
===================================================================
RCS file: /cvsroot/csdoc/csdoc/src/csdoc/ChangeLog,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ChangeLog 19 Feb 2003 05:50:11 -0000 1.1
+++ ChangeLog 19 Feb 2003 14:05:25 -0000 1.2
@@ -1,3 +1,9 @@
+
+2003-02-19 Gaurav Vaish <mastergaurav AT users DOT sf DOT net>
+
+ * driver.cs : Remove bogus part.
+ * AssemblyInfo.cs : Updated for csdoc.
+
2003-02-19 Gaurav Vaish <mastergaurav AT users DOT sf DOT net>
* cs-parser.jay,
@@ -6,10730 +12,6 @@
* decl.cs,
* driver.cs : Modifying mcs to my suite.
-2003-02-12 Miguel de Icaza <mi...@xi...>
-
- * ecore.cs (FieldExpr.AddressOf): In the particular case of This
- and structs, we do not want to load the instance variable
-
- (ImplicitReferenceConversion, ImplicitReferenceConversionExists):
- enum_type has to be handled like an object reference (implicit
- conversions exists from this to object), but the regular IsClass
- and IsValueType tests will never return true for this one.
-
- Also we use TypeManager.IsValueType instead of type.IsValueType,
- just for consistency with the rest of the code (this is only
- needed if we ever use the construct exposed by test-180.cs inside
- corlib, which we dont today).
-
-2003-02-12 Zoltan Varga <va...@fr...>
-
- * attribute.cs (ApplyAttributes): apply all MethodImplAttributes, not
- just InternalCall.
-
-2003-02-09 Martin Baulig <ma...@xi...>
-
- * namespace.cs (Namespace..ctor): Added SourceFile argument.
- (Namespace.DefineNamespaces): New static public method; this is
- called when we're compiling with debugging to add all namespaces
- to the symbol file.
-
- * tree.cs (Tree.RecordNamespace): Added SourceFile argument and
- pass it to the Namespace's .ctor.
-
- * symbolwriter.cs (SymbolWriter.OpenMethod): Added TypeContainer
- and MethodBase arguments; pass the namespace ID to the symwriter;
- pass the MethodBase instead of the token to the symwriter.
- (SymbolWriter.DefineNamespace): New method to add a namespace to
- the symbol file.
-
-2003-02-09 Martin Baulig <ma...@xi...>
-
- * symbolwriter.cs: New file. This is a wrapper around
- ISymbolWriter with a cleaner API. We'll dynamically Invoke()
- methods here in near future.
-
-2003-02-09 Martin Baulig <ma...@xi...>
-
- * codegen.cs (EmitContext.Mark): Just pass the arguments to
- ILGenerator.MarkSequencePoint() which are actually used by the
- symbol writer.
-
-2003-02-09 Martin Baulig <ma...@xi...>
-
- * location.cs (SourceFile): New public sealed class. This
- contains the name and an index which is used in the location's token.
- (Location): Reserve an appropriate number of bits in the token for
- the source file instead of walking over that list, this gives us a
- really huge performance improvement when compiling with debugging.
-
- * driver.cs (Driver.parse, Driver.tokenize_file): Take a
- `SourceFile' argument instead of a string.
- (Driver.ProcessFile): Add all the files via Location.AddFile(),
- but don't parse/tokenize here, we need to generate the list of all
- source files before we do that.
- (Driver.ProcessFiles): New static function. Parses/tokenizes all
- the files.
-
- * cs-parser.jay (CSharpParser): Take a `SourceFile' argument
- instead of a string.
-
- * cs-tokenizer.cs (Tokenizer): Take `SourceFile' argument instead
- of a string.
-
-2003-02-09 Martin Baulig <ma...@xi...>
-
- * cs-tokenizer.cs (Tokenizer.PreProcessLine): Also reset the
- filename on `#line default'.
-
-Sat Feb 8 17:03:16 CET 2003 Paolo Molaro <lu...@xi...>
-
- * statement.cs: don't clear the pinned var when the fixed statement
- returns from the method (fixes bug#37752).
-
-Sat Feb 8 12:58:06 CET 2003 Paolo Molaro <lu...@xi...>
-
- * typemanager.cs: fix from ma...@my... (Marcus Urban)
- to IsValueType.
-
-2003-02-07 Martin Baulig <ma...@xi...>
-
- * driver.cs: Removed the `--debug-args' command line argument.
-
- * codegen.cs (CodeGen.SaveSymbols): Removed, this is now done
- automatically by the AsssemblyBuilder.
- (CodeGen.InitializeSymbolWriter): We don't need to call any
- initialization function on the symbol writer anymore. This method
- doesn't take any arguments.
-
-2003-02-03 Miguel de Icaza <mi...@xi...>
-
- * driver.cs: (AddAssemblyAndDeps, LoadAssembly): Enter the types
- from referenced assemblies as well.
-
-2003-02-02 Martin Baulig <ma...@xi...>
-
- * class.cs (MethodData.Emit): Generate debugging info for external methods.
-
-2003-02-02 Martin Baulig <ma...@xi...>
-
- * class.cs (Constructor.Emit): Open the symbol writer before
- emitting the constructor initializer.
- (ConstructorInitializer.Emit): Call ec.Mark() to allow
- single-stepping through constructor initializers.
-
-2003-01-30 Miguel de Icaza <mi...@xi...>
-
- * class.cs: Handle error 549: do not allow virtual methods in
- sealed classes.
-
-2003-02-01 Jackson Harper <ja...@la...>
-
- * decl.cs: Check access levels when resolving types
-
-2003-01-31 Jackson Harper <ja...@la...>
-
- * statement.cs: Add parameters and locals set in catch blocks that might
- return to set vector
-
-2003-01-29 Miguel de Icaza <mi...@xi...>
-
- * class.cs (Operator): Set the SpecialName flags for operators.
-
- * expression.cs (Invocation.DoResolve): Only block calls to
- accessors and operators on SpecialName methods.
-
- (Cast.TryReduce): Handle conversions from char constants.
-
-
-Tue Jan 28 17:30:57 CET 2003 Paolo Molaro <lu...@xi...>
-
- * statement.cs: small memory and time optimization in FlowBranching.
-
-2003-01-28 Pedro Mart <yo...@wa...>
-
- * expression.cs (IndexerAccess.DoResolveLValue): Resolve the same
- problem that the last fix but in the other sid (Set).
-
- * expression.cs (IndexerAccess.DoResolve): Fix a problem with a null
- access when there is no indexer in the hierarchy.
-
-2003-01-27 Jackson Harper <ja...@la...>
-
- * class.cs: Combine some if statements.
-
-2003-01-27 Gonzalo Paniagua Javier <go...@xi...>
-
- * driver.cs: fixed bug #37187.
-
-2003-01-27 Pedro Martinez Juliá <yo...@wa...>
-
- * expression.cs (IndexerAccess.DoResolve): Before trying to resolve
- any indexer, it's needed to build a list with all the indexers in the
- hierarchy (AllGetters), else we have problems. Fixes #35653.
-
-2003-01-23 Miguel de Icaza <mi...@xi...>
-
- * class.cs (MethodData.Define): It is wrong for an interface
- implementation to be static in both cases: explicit and implicit.
- We were only handling this in one case.
-
- Improve the if situation there to not have negations.
-
- * class.cs (Field.Define): Turns out that we do not need to check
- the unsafe bit on field definition, only on usage. Remove the test.
-
-2003-01-22 Gonzalo Paniagua Javier <go...@xi...>
-
- * driver.cs: use assembly.Location instead of Codebase (the latest
- patch made mcs fail when using MS assemblies).
-
-2003-01-21 Tim Haynes <th...@op...>
-
- * driver.cs: use DirectorySeparatorChar instead of a hardcoded "/" to
- get the path to *corlib.dll.
-
-2003-01-21 Nick Drochak <ndr...@go...>
-
- * cs-tokenizer.cs:
- * pending.cs:
- * typemanager.cs: Remove compiler warnings
-
-2003-01-20 Duncan Mak <du...@xi...>
-
- * AssemblyInfo.cs: Bump the version number to 0.19.
-
-2003-01-20 Gonzalo Paniagua Javier <go...@xi...>
-
- * cs-tokenizer.cs: little fixes to line numbering when #line is used.
-
-2003-01-18 Zoltan Varga <va...@fr...>
-
- * class.cs (Constructor::Emit): Emit debugging info for constructors.
-
-2003-01-17 Miguel de Icaza <mi...@xi...>
-
- * cs-parser.jay: Small fix: we were not comparing the constructor
- name correctly. Thanks to Zoltan for the initial pointer.
-
-2003-01-16 Jackson Harper <ja...@la...>
-
- * cs-tokenizer.cs: Set file name when specified with #line
-
-2003-01-15 Miguel de Icaza <mi...@xi...>
-
- * cs-parser.jay: Only perform the constructor checks here if we
- are named like the class; This will help provider a better
- error. The constructor path is taken when a type definition is
- not found, but most likely the user forgot to add the type, so
- report that rather than the constructor error.
-
-Tue Jan 14 10:36:49 CET 2003 Paolo Molaro <lu...@xi...>
-
- * class.cs, rootcontext.cs: small changes to avoid unnecessary memory
- allocations.
-
-2003-01-13 Jackson Harper <ja...@la...>
-
- * cs-parser.jay: Add cleanup call.
-
-2003-01-13 Duncan Mak <du...@xi...>
-
- * cs-tokenizer.cs (Cleanup): Rename to 'cleanup' to make it more
- consistent with other methods.
-
-2003-01-13 Jackson Harper <ja...@la...>
-
- * cs-tokenizer.cs: Add Cleanup method, also fix #region error messages.
-
-Sun Jan 12 19:58:42 CET 2003 Paolo Molaro <lu...@xi...>
-
- * attribute.cs: only set GuidAttr to true when we have a
- GuidAttribute.
-
-2003-01-09 Gonzalo Paniagua Javier <go...@xi...>
-
- * ecore.cs:
- * expression.cs:
- * typemanager.cs: fixes to allow mcs compile corlib with the new
- Type.IsSubclassOf fix.
-
-2003-01-08 Miguel de Icaza <mi...@xi...>
-
- * expression.cs (LocalVariableReference.DoResolve): Classify a
- constant as a value, not as a variable. Also, set the type for
- the variable.
-
- * cs-parser.jay (fixed_statement): take a type instead of a
- pointer_type, so we can produce a better error message later.
-
- * statement.cs (Fixed.Resolve): Flag types that are not pointers
- as an error.
-
- (For.DoEmit): Make inifinite loops have a
- non-conditional branch back.
-
- (Fixed.DoEmit): First populate the pinned variables, then emit the
- statement, then clear the variables. Before I was emitting the
- code once for each fixed piece.
-
-
-2003-01-08 Martin Baulig <ma...@xi...>
-
- * statement.cs (FlowBranching.MergeChild): A break in a
- SWITCH_SECTION does not leave a loop. Fixes #36155.
-
-2003-01-08 Martin Baulig <ma...@xi...>
-
- * statement.cs (FlowBranching.CheckOutParameters): `struct_params'
- lives in the same number space than `param_map'. Fixes #36154.
-
-2003-01-07 Miguel de Icaza <mi...@xi...>
-
- * cs-parser.jay (constructor_declaration): Set the
- Constructor.ModFlags before probing for it. This makes the
- compiler report 514, 515 and 132 (the code was there, but got
- broken).
-
- * statement.cs (Goto.Resolve): Set `Returns' to ALWAYS.
- (GotoDefault.Resolve): Set `Returns' to ALWAYS.
- (GotoCase.Resolve): Set `Returns' to ALWAYS.
-
-Tue Jan 7 18:32:24 CET 2003 Paolo Molaro <lu...@xi...>
-
- * enum.cs: create the enum static fields using the enum type.
-
-Tue Jan 7 18:23:44 CET 2003 Paolo Molaro <lu...@xi...>
-
- * class.cs: don't try to create the ParamBuilder for the return
- type if it's not needed (and handle it breaking for the ms runtime
- anyway).
-
-2003-01-06 Jackson Harper <ja...@la...>
-
- * cs-tokenizer.cs: Add REGION flag to #region directives, and add checks to make sure that regions are being poped correctly
-
-2002-12-29 Miguel de Icaza <mi...@xi...>
-
- * cs-tokenizer.cs (get_cmd_arg): Fixups to allow \r to terminate
- the command. This showed up while compiling the JANET source
- code, which used \r as its only newline separator.
-
-2002-12-28 Miguel de Icaza <mi...@xi...>
-
- * class.cs (Method.Define): If we are an operator (because it
- reuses our code), then set the SpecialName and HideBySig. #36128
-
-2002-12-22 Miguel de Icaza <mi...@xi...>
-
- * ecore.cs (FieldExpr.DoResolve): Instead of throwing an
- exception, report error 120 `object reference required'.
-
- * driver.cs: Add --pause option, used during to measure the size
- of the process as it goes with --timestamp.
-
- * expression.cs (Invocation.DoResolve): Do not allow methods with
- SpecialName to be invoked.
-
-2002-12-21 Miguel de Icaza <mi...@xi...>
-
- * cs-tokenizer.cs: Small fix to the parser: compute the ascii
- number before adding it.
-
-2002-12-21 Ravi Pratap <ra...@xi...>
-
- * ecore.cs (StandardImplicitConversion): When in an unsafe
- context, we allow conversion between void * to any other pointer
- type. This fixes bug #35973.
-
-2002-12-20 Jackson Harper <ja...@la...>
-
- * codegen.cs: Use Path.GetFileNameWithoutExtension so an exception
- is not thrown when extensionless outputs are used
-
-2002-12-20 Gonzalo Paniagua Javier <go...@xi...>
-
- * rootcontext.cs: fixed compilation of corlib.
-
-2002-12-19 Miguel de Icaza <mi...@xi...>
-
- * attribute.cs (Attributes.Contains): Add new method.
-
- * class.cs (MethodCore.LabelParameters): if the parameter is an
- `out' parameter, check that no attribute `[In]' has been passed.
-
- * enum.cs: Handle the `value__' name in an enumeration.
-
-2002-12-14 Jaroslaw Kowalski <ja...@at...>
-
- * decl.cs: Added special case to allow overrides on "protected
- internal" methods
-
-2002-12-18 Ravi Pratap <ra...@xi...>
-
- * attribute.cs (Attributes.AddAttributeSection): Rename to this
- since it makes much more sense.
-
- (Attributes.ctor): Don't require a Location parameter.
-
- * rootcontext.cs (AddGlobalAttributeSection): Rename again.
-
- * attribute.cs (ApplyAttributes): Remove extra Location parameters
- since we already have that information per attribute.
-
- * everywhere : make appropriate changes.
-
- * class.cs (LabelParameters): Write the code which actually
- applies attributes to the return type. We can't do this on the MS
- .NET runtime so we flag a warning in the case an exception is
- thrown.
-
-2002-12-18 Miguel de Icaza <mi...@xi...>
-
- * const.cs: Handle implicit null conversions here too.
-
-2002-12-17 Ravi Pratap <ra...@xi...>
-
- * class.cs (MethodCore.LabelParameters): Remove the extra
- Type [] parameter since it is completely unnecessary. Instead
- pass in the method's attributes so that we can extract
- the "return" attribute.
-
-2002-12-17 Miguel de Icaza <mi...@xi...>
-
- * cs-parser.jay (parse): Use Report.Error to flag errors instead
- of ignoring it and letting the compile continue.
-
- * typemanager.cs (ChangeType): use an extra argument to return an
- error condition instead of throwing an exception.
-
-2002-12-15 Miguel de Icaza <mi...@xi...>
-
- * expression.cs (Unary.TryReduce): mimic the code for the regular
- code path. Perform an implicit cast in the cases where we can
- implicitly convert to one of the integral types, and then reduce
- based on that constant. This fixes bug #35483.
-
-2002-12-14 Gonzalo Paniagua Javier <go...@xi...>
-
- * typemanager.cs: fixed cut & paste error in GetRemoveMethod.
-
-2002-12-13 Gonzalo Paniagua Javier <go...@xi...>
-
- * namespace.cs: fixed bug #35489.
-
-2002-12-12 Miguel de Icaza <mi...@xi...>
-
- * class.cs: Remove some dead code.
-
- * cs-parser.jay: Estimate the number of methods needed
- (RootContext.MethodCount);
-
- * cs-tokenizer.cs: Use char arrays for parsing identifiers and
- numbers instead of StringBuilders.
-
- * support.cs (PtrHashtable): Add constructor with initial size;
- We can now reduce reallocations of the method table.
-
-2002-12-10 Ravi Pratap <ra...@xi...>
-
- * attribute.cs (ApplyAttributes): Keep track of the emitted
- attributes on a per-target basis. This fixes bug #35413.
-
-2002-12-10 Miguel de Icaza <mi...@xi...>
-
- * driver.cs (MainDriver): On rotor encoding 28591 does not exist,
- default to the Windows 1252 encoding.
-
- (UnixParseOption): Support version, thanks to Alp for the missing
- pointer.
-
- * AssemblyInfo.cs: Add nice assembly information.
-
- * cs-tokenizer.cs: Add fix from Felix to the #if/#else handler
- (bug 35169).
-
- * cs-parser.jay: Allow a trailing comma before the close bracked
- in the attribute_section production.
-
- * ecore.cs (FieldExpr.AddressOf): Until I figure out why the
- address of the instance was being taken, I will take this out,
- because we take the address of the object immediately here.
-
-2002-12-09 Ravi Pratap <ra...@xi...>
-
- * typemanager.cs (AreMultipleAllowed): Take care of the most
- obvious case where attribute type is not in the current assembly -
- stupid me ;-)
-
-2002-12-08 Miguel de Icaza <mi...@xi...>
-
- * ecore.cs (SimpleName.DoResolve): First perform lookups on using
- definitions, instead of doing that afterwards.
-
- Also we use a nice little hack, depending on the constructor, we
- know if we are a "composed" name or a simple name. Hence, we
- avoid the IndexOf test, and we avoid
-
- * codegen.cs: Add code to assist in a bug reporter to track down
- the source of a compiler crash.
-
-2002-12-07 Ravi Pratap <ra...@xi...>
-
- * attribute.cs (Attribute.ApplyAttributes) : Keep track of which attribute
- types have been emitted for a given element and flag an error
- if something which does not have AllowMultiple set is used more
- than once.
-
- * typemanager.cs (RegisterAttributeAllowMultiple): Keep track of
- attribute types and their corresponding AllowMultiple properties
-
- (AreMultipleAllowed): Check the property for a given type.
-
- * attribute.cs (Attribute.ApplyAttributes): Register the AllowMultiple
- property in the case we have a TypeContainer.
-
- (Attributes.AddAttribute): Detect duplicates and just skip on
- adding them. This trivial fix catches a pretty gross error in our
- attribute emission - global attributes were being emitted twice!
-
- Bugzilla bug #33187 is now fixed.
-
-2002-12-06 Miguel de Icaza <mi...@xi...>
-
- * cs-tokenizer.cs (pp_expr): Properly recurse here (use pp_expr
- instead of pp_and).
-
- * expression.cs (Binary.ResolveOperator): I can only use the
- Concat (string, string, string) and Concat (string, string,
- string, string) if the child is actually a concatenation of
- strings.
-
-2002-12-04 Miguel de Icaza <mi...@xi...>
-
- * cs-tokenizer.cs: Small fix, because decimal_digits is used in a
- context where we need a 2-character lookahead.
-
- * pending.cs (PendingImplementation): Rework so we can keep track
- of interface types all the time, and flag those which were
- implemented by parents as optional.
-
-2002-12-03 Miguel de Icaza <mi...@xi...>
-
- * expression.cs (Binary.ResolveOperator): Use
- String.Concat(string,string,string) or
- String.Concat(string,string,string,string) when possible.
-
- * typemanager: More helper methods.
-
-
-Tue Dec 3 19:32:04 CET 2002 Paolo Molaro <lu...@xi...>
-
- * pending.cs: remove the bogus return from GetMissingInterfaces()
- (see the 2002-11-06 entry: the mono runtime is now fixed in cvs).
-
-2002-12-02 Gonzalo Paniagua Javier <go...@xi...>
-
- * namespace.cs: avoid duplicated 'using xxx' being added to
- using_clauses. This prevents mcs from issuing and 'ambiguous type' error
- when we get more than one 'using' statement for the same namespace.
- Report a CS0105 warning for it.
-
-2002-11-30 Miguel de Icaza <mi...@xi...>
-
- * cs-tokenizer.cs (consume_identifier): use read directly, instead
- of calling getChar/putback, uses internal knowledge of it.
-
- (xtoken): Reorder tokenizer so most common patterns are checked
- first. This reduces the compilation time in another 5% (from 8.11s
- average to 7.73s for bootstrapping mcs on my Mobile p4/1.8ghz).
-
- The parsing time is 22% of the compilation in mcs, and from that
- 64% is spent on the tokenization process.
-
- I tried using a binary search for keywords, but this is slower
- than the hashtable. Another option would be to do a couple of
- things:
-
- * Not use a StringBuilder, instead use an array of chars,
- with a set value. Notice that this way we could catch
- the 645 error without having to do it *afterwards*.
-
- * We could write a hand-parser to avoid the hashtable
- compares altogether.
-
- The identifier consumption process takes 37% of the tokenization
- time. Another 15% is spent on is_number. 56% of the time spent
- on is_number is spent on Int64.Parse:
-
- * We could probably choose based on the string length to
- use Int32.Parse or Int64.Parse and avoid all the 64-bit
- computations.
-
- Another 3% is spend on wrapping `xtoken' in the `token' function.
-
- Handle 0xa0 as whitespace (#34752)
-
-2002-11-26 Miguel de Icaza <mi...@xi...>
-
- * typemanager.cs (IsCLRType): New routine to tell whether a type
- is one of the builtin types.
-
- Maybe it needs to use TypeCodes to be faster. Maybe we could use
- typecode in more places instead of doing pointer comparissions.
- We could leverage some knowledge about the way the typecodes are
- laid out.
-
- New code to cache namespaces in assemblies, it is currently not
- invoked, to be used soon.
-
- * decl.cs (DeclSpace.MakeFQN): Simple optimization.
-
- * expression.cs (Binary.ResolveOperator): specially handle
- strings, and do not perform user-defined operator overloading for
- built-in types.
-
-2002-11-24 Miguel de Icaza <mi...@xi...>
-
- * cs-tokenizer.cs: Avoid calling Char.IsDigit which is an
- internalcall as it is a pretty simple operation; Avoid whenever
- possible to call Char.IsLetter.
-
- (consume_identifier): Cut by half the number of
- hashtable calls by merging the is_keyword and GetKeyword behavior.
-
- Do not short-circuit, because if we do, we
- report errors (ie, #if false && true would produce an invalid
- directive error);
-
-
-2002-11-24 Martin Baulig <ma...@xi...>
-
- * expression.cs (Cast.TryReduce): If we're in checked syntax,
- check constant ranges and report a CS0221. Fixes #33186.
-
-2002-11-24 Martin Baulig <ma...@xi...>
-
- * cs-parser.jay: Make this work for uninitialized variable
- declarations in the `for' initializer. Fixes #32416.
-
-2002-11-24 Martin Baulig <ma...@xi...>
-
- * ecore.cs (Expression.ConvertExplicit): Make casting from/to
- System.Enum actually work. Fixes bug #32269, added verify-6.cs.
-
-2002-11-24 Martin Baulig <ma...@xi...>
-
- * expression.cs (Binary.DoNumericPromotions): Added `check_user_conv'
- argument; if true, we also check for user-defined conversions.
- This is only needed if both arguments are of a user-defined type.
- Fixes #30443, added test-175.cs.
- (Binary.ForceConversion): Pass the location argument to ConvertImplicit.
-
- * ecore.cs (Expression.ImplicitUserConversionExists): New method.
-
-2002-11-24 Martin Baulig <ma...@xi...>
-
- * expression.cs (ArrayAccess.GetStoreOpcode): New public static
- function to get the store opcode.
- (Invocation.EmitParams): Call ArrayAccess.GetStoreOpcode() and
- only emit the Ldelema if the store opcode is Stobj. You must run
- both test-34 and test-167 to test this. Fixes #34529.
-
-2002-11-23 Martin Baulig <ma...@xi...>
-
- * ecore.cs (Expression.MemberLookup): Added additional
- `qualifier_type' argument which is used when we're being called
- from MemberAccess.DoResolve() and null if we're called from a
- SimpleName lookup.
- (Expression.MemberLookupFailed): New method to report errors; this
- does the CS1540 check and reports the correct error message.
-
- * typemanager.cs (MemberLookup): Added additional `qualifier_type'
- argument for the CS1540 check and redone the way how we're dealing
- with private members. See the comment in the source code for details.
- (FilterWithClosure): Reverted this back to revision 1.197; renamed
- `closure_start_type' to `closure_qualifier_type' and check whether
- it's not null. It was not this filter being broken, it was just
- being called with the wrong arguments.
-
- * expression.cs (MemberAccess.DoResolve): use MemberLookupFinal()
- and pass it the correct `qualifier_type'; this also does the error
- handling for us.
-
-2002-11-22 Miguel de Icaza <mi...@xi...>
-
- * expression.cs (Invocation.EmitParams): If the we are dealing
- with a non-built-in value type, load its address as well.
-
- (ArrayCreation): Use a a pretty constant instead
- of the hardcoded value 2. Use 6 instead of 2 for the number of
- static initializers.
-
- (ArrayCreation.EmitDynamicInitializers): Peel enumerations,
- because they are not really value types, just glorified integers.
-
- * driver.cs: Do not append .exe, the CSC compiler does not do it.
-
- * ecore.cs: Remove redundant code for enumerations, make them use
- the same code path as everything else, fixes the casting issue
- with enumerations in Windows.Forms.
-
- * attribute.cs: Do only cast to string if it is a string, the
- validation happens later.
-
- * typemanager.cs: Temproary hack to avoid a bootstrap issue until
- people upgrade their corlibs.
-
- * ecore.cs: Oops, enumerations were not following the entire code path
-
-2002-11-21 Miguel de Icaza <mi...@xi...>
-
- * typemanager.cs (FilterWithClosure): Commented out the test for
- 1540 in typemanager.cs, as it has problems when accessing
- protected methods from a parent class (see test-174.cs).
-
- * attribute.cs (Attribute.ValidateGuid): new method.
- (Attribute.Resolve): Use above.
-
-2002-11-19 Miguel de Icaza <mi...@xi...>
-
- * enum.cs: In FindMembers, perform a recursive lookup for values. (34308)
-
- * ecore.cs (SimpleName.SimpleNameResolve): Remove the special
- handling for enumerations, as we only needed the TypeContainer
- functionality to begin with (this is required for the fix below to
- work for enums that reference constants in a container class for
- example).
-
- * codegen.cs (EmitContext): Make TypeContainer a DeclSpace.
-
- * enum.cs (Enum.Define): Use `this' instead of parent, so we have
- a valid TypeBuilder to perform lookups on.o
-
- * class.cs (InheritableMemberSignatureCompare): Use true in the
- call to GetGetMethod and GetSetMethod, because we are comparing
- the signature, and we need to get the methods *even* if they are
- private.
-
- (PropertyBase.CheckBase): ditto.
-
- * statement.cs (Switch.ResolveAndReduce, Block.EmitMeta,
- GotoCase.Resolve): Use Peel on EmpytCasts.
-
- * ecore.cs (EmptyCast): drop child, add Peel method.
-
-2002-11-17 Martin Baulig <ma...@xi...>
-
- * ecore.cs (EmptyCast.Child): New public property.
-
- * statement.cs (SwitchLabel.ResolveAndReduce): Check whether the
- label resolved to an EmptyCast. Fixes #34162.
- (GotoCase.Resolve): Likewise.
- (Block.EmitMeta): Likewise.
-
-2002-11-17 Martin Baulig <ma...@xi...>
-
- * expression.cs (Invocation.BetterConversion): Prefer int over
- uint; short over ushort; long over ulong for integer literals.
- Use ImplicitConversionExists instead of StandardConversionExists
- since we also need to check for user-defined implicit conversions.
- Fixes #34165. Added test-173.cs.
-
-2002-11-16 Martin Baulig <ma...@xi...>
-
- * expression.cs (Binary.EmitBranchable): Eliminate comparisions
- with the `true' and `false' literals. Fixes #33151.
-
-2002-11-16 Martin Baulig <ma...@xi...>
-
- * typemanager.cs (RealMemberLookup): Reverted Miguel's patch from
- October 22nd; don't do the cs1540 check for static members.
-
- * ecore.cs (PropertyExpr.ResolveAccessors): Rewrote this; we're
- now using our own filter here and doing the cs1540 check again.
-
-2002-11-16 Martin Baulig <ma...@xi...>
-
- * support.cs (InternalParameters): Don't crash if we don't have
- any fixed parameters. Fixes #33532.
-
-2002-11-16 Martin Baulig <ma...@xi...>
-
- * decl.cs (MemberCache.AddMethods): Use BindingFlags.FlattenHierarchy
- when looking up static methods to make this work on Windows.
- Fixes #33773.
-
-2002-11-16 Martin Baulig <ma...@xi...>
-
- * ecore.cs (PropertyExpr.VerifyAssignable): Check whether we have
- a setter rather than using PropertyInfo.CanWrite.
-
-2002-11-15 Nick Drochak <ndr...@go...>
-
- * class.cs: Allow acces to block member by subclasses. Fixes build
- breaker.
-
-2002-11-14 Martin Baulig <ma...@xi...>
-
- * class.cs (Constructor.Emit): Added the extern/block check.
- Fixes bug #33678.
-
-2002-11-14 Martin Baulig <ma...@xi...>
-
- * expression.cs (IndexerAccess.DoResolve): Do a DeclaredOnly
- iteration while looking for indexers, this is needed because the
- indexer may have a different name in our base classes. Fixed the
- error reporting (no indexers at all, not get accessor, no
- overloaded match). Fixes bug #33089.
- (IndexerAccess.DoResolveLValue): Likewise.
-
-2002-11-14 Martin Baulig <ma...@xi...>
-
- * class.cs (PropertyBase.CheckBase): Make this work for multiple
- indexers. Fixes the first part of bug #33089.
- (MethodSignature.InheritableMemberSignatureCompare): Added support
- for properties.
-
-2002-11-13 Ravi Pratap <ra...@xi...>
-
- * attribute.cs (Attribute.Resolve): Catch the
- NullReferenceException and report it since it isn't supposed to
- happen.
-
-2002-11-12 Miguel de Icaza <mi...@xi...>
-
- * expression.cs (Binary.EmitBranchable): Also handle the cases for
- LogicalOr and LogicalAnd that can benefit from recursively
- handling EmitBranchable. The code now should be nice for Paolo.
-
-2002-11-08 Miguel de Icaza <mi...@xi...>
-
- * typemanager.cs (LookupType): Added a negative-hit hashtable for
- the Type lookups, as we perform quite a number of lookups on
- non-Types. This can be removed once we can deterministically tell
- whether we have a type or a namespace in advance.
-
- But this might require special hacks from our corlib.
-
- * TODO: updated.
-
- * ecore.cs (TryImplicitIntConversion): Handle conversions to float
- and double which avoids a conversion from an integer to a double.
-
- * expression.cs: tiny optimization, avoid calling IsConstant,
- because it effectively performs the lookup twice.
-
-2002-11-06 Miguel de Icaza <mi...@xi...>
-
- But a bogus return here to keep the semantics of the old code
- until the Mono runtime is fixed.
-
- * pending.cs (GetMissingInterfaces): New method used to remove all
- the interfaces that are already implemented by our parent
- classes from the list of pending methods.
-
- * interface.cs: Add checks for calls after ResolveTypeExpr.
-
-2002-11-05 Miguel de Icaza <mi...@xi...>
-
- * class.cs (Class.Emit): Report warning 67: event not used if the
- warning level is beyond 3.
-
- * ecore.cs (Expression.ConvertExplicit): Missed a check for expr
- being a NullLiteral.
-
- * cs-parser.jay: Fix, Gonzalo reverted the order of the rank
- specifiers.
-
- * class.cs (TypeContainer.GetClassBases): Cover a missing code
- path that might fail if a type can not be resolved.
-
- * expression.cs (Binary.Emit): Emit unsigned versions of the
- operators.
-
- * driver.cs: use error 5.
-
-2002-11-02 Gonzalo Paniagua Javier <go...@gn...>
-
- * cs-parser.jay: simplified a rule and 5 SR conflicts dissapeared.
-
-2002-11-01 Miguel de Icaza <mi...@xi...>
-
- * cs-parser.jay (switch_section): A beautiful patch from Martin
- Baulig that fixed 33094.
-
-2002-10-31 Miguel de Icaza <mi...@xi...>
-
- * ecore.cs (PropertyExpr.DoResolveLValue, PropertyExpr.DoResolve):
- Check whether the base is abstract and report an error if so.
-
- * expression.cs (IndexerAccess.DoResolveLValue,
- IndexerAccess.DoResolve): ditto.
-
- (Invocation.DoResolve): ditto.
-
- (Invocation.FullMethodDesc): Improve the report string.
-
- * statement.cs (Block): Eliminate IsVariableDefined as it is
- basically just a wrapper for GetVariableInfo.
-
- * ecore.cs (SimpleName): Use new
-
- * support.cs (ReflectionParamter.ParameterType): We unwrap the
- type, as we return the actual parameter ref/unref state on a
- different call.
-
-2002-10-30 Miguel de Icaza <mi...@xi...>
-
- * support.cs: Return proper flags REF/OUT fixing the previous
- commit.
-
- * expression.cs: Reverted last patch, that was wrong. Is_ref is
- not used to mean `ref' but `ref or out' in ParameterReference
-
- * delegate.cs (FullDelegateDesc): use ParameterDesc to get the
- full type signature instead of calling TypeManger.CSharpName
- ourselves.
-
- * support.cs (InternalParameters.ParameterDesc): Do not compare
- directly to the modflags, because REF/OUT will actually be bitsets
- if set.
-
- * delegate.cs (VerifyMethod): Check also the modifiers.
-
- * cs-tokenizer.cs: Fix bug where floating point values with an
- exponent where a sign was missing was ignored.
-
- * driver.cs: Allow multiple assemblies to be specified in a single
- /r: argument
-
-2002-10-28 Miguel de Icaza <mi...@xi...>
-
- * cs-parser.jay: Ugly. We had to add a multiplicative_expression,
- because identifiers after a parenthesis would end up in this kind
- of production, and we needed to desamiguate it for having casts
- like:
-
- (UserDefinedType *) xxx
-
-2002-10-24 Miguel de Icaza <mi...@xi...>
-
- * typemanager.cs (RealMemberLookup): when we deal with a subclass,
- we should set on the Bindingflags.NonPublic, but not turn on
- private_ok. private_ok controls whether a Private member is
- returned (this is chekced on the filter routine), while the
- BindingFlags.NonPublic just controls whether private/protected
- will be allowed. This fixes the problem part of the problem of
- private properties being allowed to be used in derived classes.
-
- * expression.cs (BaseAccess): Provide an DoResolveLValue method,
- so we can call the children DoResolveLValue method (this will
- properly signal errors on lvalue assignments to base properties)
-
- * ecore.cs (PropertyExpr.ResolveAccessors): If both setter and
- getter are null, and we have a property info, we know that this
- happened because the lookup failed, so we report an error 122 for
- protection level violation.
-
- We also silently return if setter and getter are null in the
- resolve functions, this condition only happens if we have flagged
- the error before. This is the other half of the problem.
-
- (PropertyExpr.ResolveAccessors): Turns out that PropertyInfo does
- not have accessibility information, that is why we were returning
- true in the filter function in typemanager.cs.
-
- To properly report 122 (property is inaccessible because of its
- protection level) correctly, we report this error in ResolveAccess
- by failing if both the setter and the getter are lacking (ie, the
- lookup failed).
-
- DoResolve and DoLResolve have been modified to check for both
- setter/getter being null and returning silently, the reason being
- that I did not want to put the knowledge about this error in upper
- layers, like:
-
- int old = Report.Errors;
- x = new PropertyExpr (...);
- if (old != Report.Errors)
- return null;
- else
- return x;
-
- So the property expr is returned, but it is invalid, so the error
- will be flagged during the resolve process.
-
- * class.cs: Remove InheritablePropertySignatureCompare from the
- class, as we no longer depend on the property signature to compute
- whether it is possible to implement a method or not.
-
- The reason is that calling PropertyInfo.GetGetMethod will return
- null (in .NET, in Mono it works, and we should change this), in
- cases where the Get Method does not exist in that particular
- class.
-
- So this code:
-
- class X { public virtual int A { get { return 1; } } }
- class Y : X { }
- class Z : Y { public override int A { get { return 2; } } }
-
- Would fail in Z because the parent (Y) would not have the property
- defined. So we avoid this completely now (because the alternative
- fix was ugly and slow), and we now depend exclusively on the
- method names.
-
- (PropertyBase.CheckBase): Use a method-base mechanism to find our
- reference method, instead of using the property.
-
- * typemanager.cs (GetPropertyGetter, GetPropertySetter): These
- routines are gone now.
-
- * typemanager.cs (GetPropertyGetter, GetPropertySetter): swap the
- names, they were incorrectly named.
-
- * cs-tokenizer.cs: Return are more gentle token on failure.
-
- * pending.cs (PendingImplementation.InterfaceMethod): This routine
- had an out-of-sync index variable, which caused it to remove from
- the list of pending methods the wrong method sometimes.
-
-2002-10-22 Miguel de Icaza <mi...@xi...>
-
- * ecore.cs (PropertyExpr): Do not use PropertyInfo.CanRead,
- CanWrite, because those refer to this particular instance of the
- property, and do not take into account the fact that we can
- override single members of a property.
-
- Constructor requires an EmitContext. The resolution process does
- not happen here, but we need to compute the accessors before,
- because the resolution does not always happen for properties.
-
- * typemanager.cs (RealMemberLookup): Set private_ok if we are a
- subclass, before we did not update this flag, but we did update
- bindingflags.
-
- (GetAccessors): Drop this routine, as it did not work in the
- presence of partially overwritten set/get methods.
-
- Notice that this broke the cs1540 detection, but that will require
- more thinking.
-
-2002-10-22 Gonzalo Paniagua Javier <go...@xi...>
-
- * class.cs:
- * codegen.cs:
- * driver.cs: issue a warning instead of an error if we don't support
- debugging for the platform. Also ignore a couple of errors that may
- arise when trying to write the symbols. Undo my previous patch.
-
-2002-10-22 Gonzalo Paniagua Javier <go...@xi...>
-
- * driver.cs: ignore /debug switch except for Unix platforms.
-
-2002-10-23 Nick Drochak <ndr...@go...>
-
- * makefile: Remove mcs2.exe and mcs3.exe on 'make clean'
-
-2002-10-21 Miguel de Icaza <mi...@xi...>
-
- * driver.cs: Do not make mcs-debug conditional, so we do not break
- builds that use it.
-
- * statement.cs (UsageVector.MergeChildren): I would like Martin to
- review this patch. But basically after all the children variables
- have been merged, the value of "Breaks" was not being set to
- new_breaks for Switch blocks. I think that it should be set after
- it has executed. Currently I set this to the value of new_breaks,
- but only if new_breaks is FlowReturn.ALWAYS, which is a bit
- conservative, but I do not understand this code very well.
-
- I did not break anything in the build, so that is good ;-)
-
- * cs-tokenizer.cs: Also allow \r in comments as a line separator.
-
-2002-10-20 Mark Crichton <cri...@gi...>
-
- * cfold.cs: Fixed compile blocker. Really fixed it this time.
-
-2002-10-20 Nick Drochak <ndr...@go...>
-
- * cfold.cs: Fixed compile blocker.
-
-2002-10-20 Miguel de Icaza <mi...@xi...>
-
- * driver.cs: I was chekcing the key, not the file.
-
-2002-10-19 Ravi Pratap <ra...@xi...>
-
- * ecore.cs (UserDefinedConversion): Get rid of the bogus error
- message that we were generating - we just need to silently return
- a null.
-
-2002-10-19 Miguel de Icaza <mi...@xi...>
-
- * class.cs (Event.Define): Change my previous commit, as this
- breaks the debugger. This is a temporary hack, as it seems like
- the compiler is generating events incorrectly to begin with.
-
- * expression.cs (Binary.ResolveOperator): Added support for
- "U operator - (E x, E y)"
-
- * cfold.cs (BinaryFold): Added support for "U operator - (E x, E
- y)".
-
- * ecore.cs (FieldExpr.AddressOf): We had a special code path for
- init-only variables, but this path did not take into account that
- there might be also instance readonly variables. Correct this
- problem.
-
- This fixes bug 32253
-
- * delegate.cs (NewDelegate.DoResolve): Catch creation of unsafe
- delegates as well.
-
- * driver.cs: Change the extension for modules to `netmodule'
-
- * cs-parser.jay: Improved slightly the location tracking for
- the debugger symbols.
-
- * class.cs (Event.Define): Use Modifiers.FieldAttr on the
- modifiers that were specified instead of the hardcoded value
- (FamAndAssem). This was basically ignoring the static modifier,
- and others. Fixes 32429.
-
- * statement.cs (Switch.SimpleSwitchEmit): Simplified the code, and
- fixed a bug in the process (32476)
-
- * expression.cs (ArrayAccess.EmitAssign): Patch from
- hwa...@ya... that fixes bug 31834.3
-
-2002-10-18 Miguel de Icaza <mi...@xi...>
-
- * driver.cs: Make the module extension .netmodule.
-
-2002-10-16 Miguel de Icaza <mi...@xi...>
-
- * driver.cs: Report an error if the resource file is not found
- instead of crashing.
-
- * ecore.cs (PropertyExpr.EmitAssign): Pass IsBase instead of
- false, like Emit does.
-
-2002-10-16 Nick Drochak <ndr...@go...>
-
- * typemanager.cs: Remove unused private member. Also reported mcs
- bug to report this as a warning like csc.
-
-2002-10-15 Martin Baulig <ma...@gn...>
-
- * statement.cs (Statement.Emit): Made this a virtual method; emits
- the line number info and calls DoEmit().
- (Statement.DoEmit): New protected abstract method, formerly knows
- as Statement.Emit().
-
- * codegen.cs (EmitContext.Mark): Check whether we have a symbol writer.
-
-2002-10-11 Miguel de Icaza <mi...@xi...>
-
- * class.cs: Following the comment from 2002-09-26 to AddMethod, I
- have fixed a remaining problem: not every AddXXXX was adding a
- fully qualified name.
-
- Now everyone registers a fully qualified name in the DeclSpace as
- being defined instead of the partial name.
-
- Downsides: we are slower than we need to be due to the excess
- copies and the names being registered this way.
-
- The reason for this is that we currently depend (on the corlib
- bootstrap for instance) that types are fully qualified, because
- we dump all the types in the namespace, and we should really have
- types inserted into the proper namespace, so we can only store the
- basenames in the defined_names array.
-
-2002-10-10 Martin Baulig <ma...@gn...>
-
- * expression.cs (ArrayAccess.EmitStoreOpcode): Reverted the patch
- from bug #31834, see the bug report for a testcase which is
- miscompiled.
-
-2002-10-10 Martin Baulig <ma...@gn...>
-
- * codegen.cs (EmitContext.Breaks): Removed, we're now using the
- flow analysis code for this.
-
- * statement.cs (Do, While, For): Tell the flow analysis code about
- infinite loops.
- (FlowBranching.UsageVector): Added support for infinite loops.
- (Block.Resolve): Moved the dead code elimination here and use flow
- analysis to do it.
-
-2002-10-09 Miguel de Icaza <mi...@xi...>
-
- * class.cs (Field.Define): Catch cycles on struct type
- definitions.
-
- * typemanager.cs (IsUnmanagedtype): Do not recursively check
- fields if the fields are static. We only need to check instance
- fields.
-
- * expression.cs (As.DoResolve): Test for reference type.
-
- * statement.cs (Using.ResolveExpression): Use
- ConvertImplicitRequired, not ConvertImplicit which reports an
- error on failture
- (Using.ResolveLocalVariableDecls): ditto.
-
- * expression.cs (Binary.ResolveOperator): Report errors in a few
- places where we had to.
-
- * typemanager.cs (IsUnmanagedtype): Finish implementation.
-
-2002-10-08 Miguel de Icaza <mi...@xi...>
-
- * expression.cs: Use StoreFromPtr instead of extracting the type
- and then trying to use Stelem. Patch is from hwa...@ya...
-
- * ecore.cs (ImplicitReferenceConversion): It is possible to assign
- an enumeration value to a System.Enum, but System.Enum is not a
- value type, but an class type, so we need to box.
-
- (Expression.ConvertExplicit): One codepath could return
- errors but not flag them. Fix this. Fixes #31853
-
- * parameter.cs (Resolve): Do not allow void as a parameter type.
-
-2002-10-06 Martin Baulig <ma...@gn...>
-
- * statemenc.cs (FlowBranching.SetParameterAssigned): Don't crash
- if it's a class type and not a struct. Fixes #31815.
-
-2002-10-06 Martin Baulig <ma...@gn...>
-
- * statement.cs: Reworked the flow analysis code a bit to make it
- usable for dead code elimination.
-
-2002-10-06 Gonzalo Paniagua Javier <go...@xi...>
-
- * cs-parser.jay: allow empty source files. Fixes bug #31781.
-
-2002-10-04 Miguel de Icaza <mi...@xi...>
-
- * expression.cs (ComposedCast.DoResolveType): A quick workaround
- to fix the test 165, will investigate deeper.
-
-2002-10-04 Martin Baulig <ma...@gn...>
-
- * statement.cs (FlowBranching.UsageVector.MergeChildren): Make
- finally blocks actually work.
- (Try.Resolve): We don't need to create a sibling for `finally' if
- there is no finally block.
-
-2002-10-04 Martin Baulig <ma...@gn...>
-
- * class.cs (Constructor.Define): The default accessibility for a
- non-default constructor is private, not public.
-
-2002-10-04 Miguel de Icaza <mi...@xi...>
-
- * class.cs (Constructor): Make AllowedModifiers public, add
- EXTERN.
-
- * cs-parser.jay: Perform the modifiers test here, as the
- constructor for the Constructor class usually receives a zero
- because of the way we create it (first we create, later we
- customize, and we were never checking the modifiers).
-
- * typemanager.cs (Typemanager.LookupTypeDirect): This new function
- is a version of LookupTypeReflection that includes the type-name
- cache. This can be used as a fast path for functions that know
- the fully qualified name and are only calling into *.GetType() to
- obtain a composed type.
-
- This is also used by TypeManager.LookupType during its type
- composition.
-
- (LookupType): We now also track the real type name, as sometimes
- we can get a quey for the real type name from things like
- ComposedCast. This fixes bug 31422.
-
- * expression.cs (ComposedCast.Resolve): Since we are obtaining a
- complete type fullname, it does not have to go through the type
- resolution system to obtain the composed version of the type (for
- obtaining arrays or pointers).
-
- (Conditional.Emit): Use the EmitBoolExpression to
- generate nicer code, as requested by Paolo.
-
- (ArrayCreation.CheckIndices): Use the patch from
- hwa...@ya... to validate the array initializers.
-
-2002-10-03 Miguel de Icaza <mi...@xi...>
-
- * class.cs (ConstructorInitializer.Emit): simplify code by using
- Invocation.EmitCall, and at the same time, fix the bugs in calling
- parent constructors that took variable arguments.
-
- * ecore.cs (Expression.ConvertNumericExplicit,
- Expression.ImplicitNumericConversion): Remove the code that
- manually wrapped decimal (InternalTypeConstructor call is now gone
- as well).
-
- * expression.cs (Cast.TryReduce): Also handle decimal types when
- trying to perform a constant fold on the type.
-
- * typemanager.cs (IsUnmanagedtype): Partially implemented.
-
- * parameter.cs: Removed ResolveAndDefine, as it was not needed, as
- that only turned off an error report, and did nothing else.
-
-2002-10-02 Miguel de Icaza <mi...@xi...>
-
- * driver.cs: Handle and ignore /fullpaths
-
-2002-10-01 Miguel de Icaza <mi...@xi...>
-
- * expression.cs (Binary.ResolveOperator): Catch the case where
- DoNumericPromotions returns true,
-
- (Binary.DoNumericPromotions): Simplify the code, and the tests.
-
-2002-09-27 Miguel de Icaza <mi...@xi...>
-
- * ecore.cs (EventExpr.Emit): Instead of emitting an exception,
- report error 70.
-
-2002-09-26 Miguel de Icaza <mi...@xi...>
-
- * ecore.cs (ConvertNumericExplicit): It is not enough that the
- conversion exists, but it is also required that the conversion be
- performed. This manifested in "(Type64Enum) 2".
-
- * class.cs (TypeManager.AddMethod): The fix is not to change
- AddEnum, because that one was using a fully qualified name (every
- DeclSpace derivative does), but to change the AddMethod routine
- that was using an un-namespaced name. This now correctly reports
- the duplicated name.
-
- Revert patch until I can properly fix it. The issue
- is that we have a shared Type space across all namespaces
- currently, which is wrong.
-
- Options include making the Namespace a DeclSpace, and merge
- current_namespace/current_container in the parser.
-
-2002-09-25 Miguel de Icaza <mi...@xi...>
-
- * cs-parser.jay: Improve error reporting when we get a different
- kind of expression in local_variable_type and
- local_variable_pointer_type.
-
- Propagate this to avoid missleading errors being reported.
-
- * ecore.cs (ImplicitReferenceConversion): treat
- TypeManager.value_type as a target just like object_type. As
- code like this:
-
- ValueType v = 1;
-
- Is valid, and needs to result in the int 1 being boxed before it
- is assigned to the value type v.
-
- * class.cs (TypeContainer.AddEnum): Use the basename, not the name
- to validate the enumeration name.
-
- * expression.cs (ArrayAccess.EmitAssign): Mimic the same test from
- EmitDynamicInitializers for the criteria to use Ldelema. Thanks
- to hwa...@ya... for finding the bug and providing a patch.
-
- * ecore.cs (TryImplicitIntConversion): When doing an
- implicit-enumeration-conversion, check if the type is 64-bits and
- perform a conversion before passing to EnumConstant.
-
-2002-09-23 Miguel de Icaza <mi...@xi...>
-
- * decl.cs (Error_AmbiguousTypeReference); New routine used to
- report ambiguous type references. Unlike the MS version, we
- report what the ambiguity is. Innovation at work ;-)
-
- (DeclSpace.FindType): Require a location argument to
- display when we display an ambiguous error.
-
- * ecore.cs: (SimpleName.DoResolveType): Pass location to FindType.
-
- * interface.cs (GetInterfaceTypeByName): Pass location to FindType.
-
- * expression.cs (EmitDynamicInitializers): Apply patch from
- hwa...@ya... that fixes the order in which we emit our
- initializers.
-
-2002-09-21 Martin Baulig <ma...@gn...>
-
- * delegate.cs (Delegate.VerifyApplicability): Make this work if the
- delegate takes no arguments.
-
-2002-09-20 Miguel de Icaza <mi...@xi...>
-
- * constant.cs: Use Conv_U8 instead of Conv_I8 when loading longs
- from integers.
-
- * expression.cs: Extract the underlying type.
-
- * ecore.cs (StoreFromPtr): Use TypeManager.IsEnumType instad of IsEnum
-
- * decl.cs (FindType): Sorry about this, fixed the type lookup bug.
-
-2002-09-19 Miguel de Icaza <mi...@xi...>
-
- * class.cs (TypeContainer.DefineType): We can not use the nice
- PackingSize with the size set to 1 DefineType method, because it
- will not allow us to define the interfaces that the struct
- implements.
-
- This completes the fixing of bug 27287
-
- * ecore.cs (Expresion.ImplicitReferenceConversion): `class-type S'
- means also structs. This fixes part of the problem.
- (Expresion.ImplicitReferenceConversionExists): ditto.
-
- * decl.cs (DeclSparce.ResolveType): Only report the type-not-found
- error if there were no errors reported during the type lookup
- process, to avoid duplicates or redundant errors. Without this
- you would get an ambiguous errors plus a type not found. We have
- beaten the user enough with the first error.
-
- (DeclSparce.FindType): Emit a warning if we have an ambiguous
- reference.
-
- * ecore.cs (SimpleName.DoResolveType): If an error is emitted
- during the resolution process, stop the lookup, this avoids
- repeated error reports (same error twice).
-
- * rootcontext.cs: Emit a warning if we have an ambiguous reference.
-
- * typemanager.cs (LookupType): Redo the type lookup code to match
- the needs of System.Reflection.
-
- The issue is that System.Reflection requires references to nested
- types to begin with a "+" sign instead of a dot. So toplevel
- types look like: "NameSpace.TopLevelClass", and nested ones look
- like "Namespace.TopLevelClass+Nested", with arbitrary nesting
- levels.
-
-2002-09-19 Martin Baulig <ma...@gn...>
-
- * codegen.cs (EmitContext.EmitTopBlock): If control flow analysis
- says that a method always returns or always throws an exception,
- don't report the CS0161.
-
- * statement.cs (FlowBranching.UsageVector.MergeChildren): Always
- set `Returns = new_returns'.
-
-2002-09-19 Martin Baulig <ma...@gn...>
-
- * expression.cs (MemberAccess.ResolveMemberAccess): When resolving
- to an enum constant, check for a CS0176.
-
-2002-09-18 Miguel de Icaza <mi...@xi...>
-
- * class.cs (TypeContainer.CheckPairedOperators): Now we check
- for operators that must be in pairs and report errors.
-
- * ecore.cs (SimpleName.DoResolveType): During the initial type
- resolution process, when we define types recursively, we must
- check first for types in our current scope before we perform
- lookups in the enclosing scopes.
-
- * expression.cs (MakeByteBlob): Handle Decimal blobs.
-
- (Invocation.VerifyArgumentsCompat): Call
- TypeManager.TypeToCoreType on the parameter_type.GetElementType.
- I thought we were supposed to always call this, but there are a
- few places in the code where we dont do it.
-
-2002-09-17 Miguel de Icaza <mi...@xi...>
-
- * driver.cs: Add support in -linkres and -resource to specify the
- name of the identifier.
-
-2002-09-16 Miguel de Icaza <mi...@xi...>
-
- * ecore.cs (StandardConversionExists): Sync with the conversion
- code: allow anything-* to void* conversions.
-
- (FindMostSpecificSource): Use an Expression argument
- instead of a Type, because we might be handed over a Literal which
- gets a few more implicit conversions that plain types do not. So
- this information was being lost.
-
- Also, we drop the temporary type-holder expression when not
- required.
-
-2002-09-17 Martin Baulig <ma...@gn...>
-
- * class.cs (PropertyBase.CheckBase): Don't check the base class if
- this is an explicit interface implementation.
-
-2002-09-17 Martin Baulig <ma...@gn...>
-
- * class.cs (PropertyBase.CheckBase): Make this work for indexers with
- different `IndexerName' attributes.
-
- * expression.cs (BaseIndexerAccess): Rewrote this class to use IndexerAccess.
- (IndexerAccess): Added special protected ctor for BaseIndexerAccess and
- virtual CommonResolve().
-
-2002-09-16 Miguel de Icaza <mi...@xi...>
-
- * enum.cs (LookupEnumValue): Use the EnumConstant declared type,
- and convert that to the UnderlyingType.
-
- * statement.cs (Foreach.Resolve): Indexers are just like variables
- or PropertyAccesses.
-
- * cs-tokenizer.cs (consume_string): Track line numbers and columns
- inside quoted strings, we were not doing this before.
-
-2002-09-16 Martin Baulig <ma...@gn...>
-
- * ecore.cs (MethodGroupExpr.DoResolve): If we have an instance expression,
- resolve it. This is needed for the definite assignment check of the
- instance expression, fixes bug #29846.
- (PropertyExpr.DoResolve, EventExpr.DoResolve): Likewise.
-
-2002-09-16 Nick Drochak <ndr...@go...>
-
- * parameter.cs: Fix compile error. Cannot reference static member
- from an instance object. Is this an mcs bug?
-
-2002-09-14 Martin Baulig <ma...@gn...>
-
- * decl.cs (MemberCache.SetupCacheForInterface): Don't add an interface
- multiple times. Fixes bug #30295, added test-166.cs.
-
-2002-09-14 Martin Baulig <ma...@gn...>
-
- * statement.cs (Block.Emit): Don't emit unreachable code.
- (Switch.SimpleSwitchEmit, Switch.TableSwitchEmit): Check for missing
- `break' statements.
- (Goto.Emit, Continue.Emit): Set ec.Breaks = true.
-
-2002-09-14 Martin Baulig <ma...@gn...>
-
- * parameter.cs (Parameter.Attributes): Make this work if Modifier.ISBYREF
- is set.
-
-2002-09-14 Martin Baulig <ma...@gn...>
-
- * typemanager.cs (TypeManager.IsNestedChildOf): This must return false
- if `type == parent' since in this case `type.IsSubclassOf (parent)' will
- be false on the ms runtime.
-
-2002-09-13 Martin Baulig <ma...@gn...>
-
- * ecore.cs (SimpleName.SimpleNameResolve): Include the member name in
- the CS0038 error message.
-
-2002-09-12 Miguel de Icaza <mi...@xi...>
-
- * expression.cs (CheckedExpr, UnCheckedExpr): If we have a
- constant inside, return it.
-
-2002-09-12 Martin Baulig <ma...@gn...>
-
- * cfold.cs (ConstantFold.DoConstantNumericPromotions): Check whether an
- implicit conversion can be done between enum types.
-
- * enum.cs (Enum.LookupEnumValue): If the value is an EnumConstant,
- check whether an implicit conversion to the current enum's UnderlyingType
- exists and report an error if not.
-
- * codegen.cs (CodeGen.Init): Delete the symbol file when compiling
- without debugging support.
-
- * delegate.cs (Delegate.CloseDelegate): Removed, use CloseType instead.
- Fixes bug #30235. Thanks to Ricardo Fernández Pascual.
-
-2002-09-12 Martin Baulig <ma...@gn...>
-
- * typemanager.cs (TypeManager.IsNestedChildOf): New method.
-
- * ecore.cs (IMemberExpr.DeclaringType): New property.
- (SimpleName.SimpleNameResolve): Check whether we're accessing a
- nonstatic member of an outer type (CS0038).
-
-2002-09-11 Miguel de Icaza <mi...@xi...>
-
- * driver.cs: Activate the using-error detector at warning level
- 4 (at least for MS-compatible APIs).
-
- * namespace.cs (VerifyUsing): Small buglett fix.
-
- * pending.cs (PendingImplementation): pass the container pointer.
-
- * interface.cs (GetMethods): Allow for recursive definition. Long
- term, I would like to move every type to support recursive
- definitions, not the current ordering mechanism that we have right
- now.
-
- The situation is this: Attributes are handled before interfaces,
- so we can apply attributes to interfaces. But some attributes
- implement interfaces, we will now handle the simple cases
- (recursive definitions will just get an error).
-
- * parameter.cs: Only invalidate types at the end if we fail to
- lookup all types.
-
-2002-09-09 Martin Baulig <ma...@gn...>
-
- * ecore.cs (PropertyExpr.Emit): Also check for
- TypeManager.system_int_array_get_length so this'll also work when
- compiling corlib. Fixes #30003.
-
-2002-09-09 Martin Baulig <ma...@gn...>
-
- * expression.cs (ArrayCreation.MakeByteBlob): Added support for enums
- and throw an exception if we can't get the type's size. Fixed #30040,
- added test-165.cs.
-
-2002-09-09 Martin Baulig <ma...@gn...>
-
- * ecore.cs (PropertyExpr.DoResolve): Added check for static properies.
-
- * expression.cs (SizeOf.DoResolve): Sizeof is only allowed in unsafe
- context. Fixes bug #30027.
-
- * delegate.cs (NewDelegate.Emit): Use OpCodes.Ldvirtftn for
- virtual functions. Fixes bug #30043, added test-164.cs.
-
-2002-09-08 Ravi Pratap <ra...@xi...>
-
- * attribute.cs : Fix a small NullRef crash thanks to my stupidity.
-
-2002-09-08 Nick Drochak <ndr...@go...>
-
- * driver.cs: Use an object to get the windows codepage since it's not a
- static property.
-
-2002-09-08 Miguel de Icaza <mi...@xi...>
-
- * statement.cs (For.Emit): for infinite loops (test == null)
- return whether there is a break inside, not always "true".
-
- * namespace.cs (UsingEntry): New struct to hold the name of the
- using definition, the location where it is defined, and whether it
- has been used in a successful type lookup.
-
- * rootcontext.cs (NamespaceLookup): Use UsingEntries instead of
- strings.
-
- * decl.cs: ditto.
-
-2002-09-06 Ravi Pratap <ra...@xi...>
-
- * attribute.cs : Fix incorrect code which relied on catching
- a NullReferenceException to detect a null being passed in
- where an object was expected.
-
-2002-09-06 Miguel de Icaza <mi...@xi...>
-
- * statement.cs (Try): flag the catch variable as assigned
-
- * exp...
[truncated message content] |
|
From: Gaurav V. <mas...@us...> - 2003-02-19 05:49:44
|
Update of /cvsroot/csdoc/csdoc/src/csdoc In directory sc8-pr-cvs1:/tmp/cvs-serv9162 Added Files: .cvsignore Log Message: --- NEW FILE --- compiler.pdb compiler.exe compiler.suo compiler.csproj compiler.csproj.user cs-parser.cs y.output *.pdb mcs |
|
From: Gaurav V. <mas...@us...> - 2003-02-19 05:48:42
|
Update of /cvsroot/csdoc/csdoc/src In directory sc8-pr-cvs1:/tmp/cvs-serv8828 Modified Files: makefile Added Files: ChangeLog README Log Message: 2003-02-19 * jay, mcs, nant, tests, csdoc : Created directories. --- NEW FILE --- 2003-02-19 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> * jay, mcs, nant, tests, csdoc : Created directories. --- NEW FILE --- csdoc: The CSDocument Generator. Hacked version of mcs (by Gaurav Vaish) jay: C# Port of Jay (by Miguel and company) mcs: The Mono C# compiler (by Mono team) nant: C# Port of Ant tests: Documentation tests Index: makefile =================================================================== RCS file: /cvsroot/csdoc/csdoc/src/makefile,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- makefile 18 Feb 2003 07:30:49 -0000 1.1 +++ makefile 19 Feb 2003 05:48:39 -0000 1.2 @@ -1,4 +1,4 @@ -DIRS=jay nant mcs +DIRS=jay nant mcs csdoc INSTALL= /usr/bin/install all: linux |
|
From: Gaurav V. <mas...@us...> - 2003-02-19 05:48:04
|
Update of /cvsroot/csdoc/csdoc/src/csdoc In directory sc8-pr-cvs1:/tmp/cvs-serv8744/csdoc Log Message: Directory /cvsroot/csdoc/csdoc/src/csdoc added to the repository |
|
From: Gaurav V. <mas...@us...> - 2003-02-19 05:43:16
|
Update of /cvsroot/csdoc/csdoc/src/mcs
In directory sc8-pr-cvs1:/tmp/cvs-serv7161
Modified Files:
cs-parser.jay cs-tokenizer.cs
Log Message:
2003-02-19
* **: Reverting changes. Will update in ../csodc.
Index: cs-parser.jay
===================================================================
RCS file: /cvsroot/csdoc/csdoc/src/mcs/cs-parser.jay,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- cs-parser.jay 18 Feb 2003 14:30:17 -0000 1.3
+++ cs-parser.jay 19 Feb 2003 05:43:13 -0000 1.4
@@ -650,7 +650,6 @@
current_container = new_struct;
current_container.Namespace = current_namespace;
RootContext.Tree.RecordDecl (full_struct_name, new_struct);
- lexer.SaveDocumentFor(new_struct);
}
opt_class_base
struct_body
@@ -805,7 +804,6 @@
}
;
-// Modified by Gaurav Vaish
method_declaration
: method_header
method_body
@@ -830,7 +828,6 @@
method.Block = (Block) $2;
CheckDef (current_container.AddMethod (method), method.Name, method.Location);
- lexer.SaveDocumentFor(method);
current_local_parameters = null;
}
@@ -1098,7 +1095,6 @@
current_interface = new_interface;
new_interface.Namespace = current_namespace;
RootContext.Tree.RecordDecl (full_interface_name, new_interface);
- lexer.SaveDocumentFor(new_interface);
}
opt_interface_base
interface_body opt_semicolon
@@ -1492,7 +1488,6 @@
}
;
-// Added by Gaurav Vaish
event_declaration
: opt_attributes
opt_modifiers
@@ -1504,7 +1499,6 @@
var.expression_or_array_initializer,
(int) $2, null, null, (Attributes) $1, lexer.Location);
- lexer.SaveDocumentFor(e);
CheckDef (current_container.AddEvent (e), e.Name, e.Location);
}
@@ -1537,7 +1531,6 @@
Event e = new Event ((Expression) $4, (string) $5, null, (int) $2, add_accessor, rem_accessor,
(Attributes) $1, loc);
- lexer.SaveDocumentFor(e);
CheckDef (current_container.AddEvent (e), e.Name, loc);
implicit_value_parameter_type = null;
@@ -1688,7 +1681,6 @@
CheckDef (current_container.AddEnum (e), full_name, enum_location);
RootContext.Tree.RecordDecl (full_name, e);
- lexer.SaveDocumentFor(e);
}
;
@@ -1759,8 +1751,7 @@
del.Namespace = current_namespace;
CheckDef (current_container.AddDelegate (del), del.Name, l);
- lexer.SaveDocumentFor(del);
- }
+ }
| opt_attributes
opt_modifiers
DELEGATE VOID
@@ -1777,7 +1768,6 @@
del.Namespace = current_namespace;
CheckDef (current_container.AddDelegate (del), del.Name, l);
- lexer.SaveDocumentFor(del);
}
;
@@ -2587,8 +2577,6 @@
//
// 10 classes
-// Adding support for documentation.
-// Modified by Gaurav Vaish.
//
class_declaration
: opt_attributes
@@ -2602,7 +2590,6 @@
new_class = new Class (current_container, name, (int) $2,
(Attributes) $1, lexer.Location);
- lexer.SaveDocumentFor(new_class);
current_container = new_class;
current_container.Namespace = current_namespace;
RootContext.Tree.RecordDecl (name, new_class);
@@ -2612,7 +2599,6 @@
opt_semicolon
{
Class new_class = (Class) current_container;
- //lexer.SaveDocumentFor(new_class);
if ($6 != null)
new_class.Bases = (ArrayList) $6;
Index: cs-tokenizer.cs
===================================================================
RCS file: /cvsroot/csdoc/csdoc/src/mcs/cs-tokenizer.cs,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- cs-tokenizer.cs 18 Feb 2003 11:39:21 -0000 1.2
+++ cs-tokenizer.cs 19 Feb 2003 05:43:13 -0000 1.3
@@ -54,19 +54,6 @@
bool any_token_seen = false;
static Hashtable tokenValues;
- // Adding support for documentation.
- // Modified by Gaurav Vaish
-
- private Hashtable documentationStrings = new Hashtable();
- private string commentString = "";
-
- public void SaveDocumentFor(object new_class)
- {
- documentationStrings[new_class] = commentString;
- System.Console.WriteLine("Document for {0}:\n\n{1}", new_class.ToString(), commentString);
- commentString = "";
- }
-
private static Hashtable TokenValueName
{
get {
@@ -1612,12 +1599,8 @@
if (d == '/'){
getChar ();
- // Modified by Gaurav Vaish
while ((d = getChar ()) != -1 && (d != '\n') && d != '\r')
- {
- commentString += (char)d;
col++;
- }
if (d == '\n'){
line++;
ref_line++;
@@ -1635,7 +1618,6 @@
col++;
break;
}
- commentString += (char)d;
if (d == '\n'){
line++;
ref_line++;
|
|
From: Gaurav V. <mas...@us...> - 2003-02-18 14:30:29
|
Update of /cvsroot/csdoc/csdoc/src/mcs
In directory sc8-pr-cvs1:/tmp/cvs-serv11527
Modified Files:
cs-parser.jay
Log Message:
2003-02-18
* cs-parser.jay: Commit for Lupus
Index: cs-parser.jay
===================================================================
RCS file: /cvsroot/csdoc/csdoc/src/mcs/cs-parser.jay,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- cs-parser.jay 18 Feb 2003 11:39:21 -0000 1.2
+++ cs-parser.jay 18 Feb 2003 14:30:17 -0000 1.3
@@ -650,6 +650,7 @@
current_container = new_struct;
current_container.Namespace = current_namespace;
RootContext.Tree.RecordDecl (full_struct_name, new_struct);
+ lexer.SaveDocumentFor(new_struct);
}
opt_class_base
struct_body
@@ -804,6 +805,7 @@
}
;
+// Modified by Gaurav Vaish
method_declaration
: method_header
method_body
@@ -828,6 +830,7 @@
method.Block = (Block) $2;
CheckDef (current_container.AddMethod (method), method.Name, method.Location);
+ lexer.SaveDocumentFor(method);
current_local_parameters = null;
}
@@ -1095,6 +1098,7 @@
current_interface = new_interface;
new_interface.Namespace = current_namespace;
RootContext.Tree.RecordDecl (full_interface_name, new_interface);
+ lexer.SaveDocumentFor(new_interface);
}
opt_interface_base
interface_body opt_semicolon
@@ -1684,6 +1688,7 @@
CheckDef (current_container.AddEnum (e), full_name, enum_location);
RootContext.Tree.RecordDecl (full_name, e);
+ lexer.SaveDocumentFor(e);
}
;
@@ -1754,7 +1759,8 @@
del.Namespace = current_namespace;
CheckDef (current_container.AddDelegate (del), del.Name, l);
- }
+ lexer.SaveDocumentFor(del);
+ }
| opt_attributes
opt_modifiers
DELEGATE VOID
@@ -1771,6 +1777,7 @@
del.Namespace = current_namespace;
CheckDef (current_container.AddDelegate (del), del.Name, l);
+ lexer.SaveDocumentFor(del);
}
;
@@ -2605,7 +2612,7 @@
opt_semicolon
{
Class new_class = (Class) current_container;
- lexer.SaveDocumentFor(new_class);
+ //lexer.SaveDocumentFor(new_class);
if ($6 != null)
new_class.Bases = (ArrayList) $6;
|
|
From: Gaurav V. <mas...@us...> - 2003-02-18 13:31:19
|
Update of /cvsroot/csdoc/csdoc/src/tests
In directory sc8-pr-cvs1:/tmp/cvs-serv18026
Added Files:
test-01.cs
Log Message:
2003-02-18
* test-01.cs : New test. Minor Changes.
--- NEW FILE ---
using System;
/**
* <summary>Hello</summary>
*/
public class Test
{
// Comment over HandleTest
public event EventHandler HandleTest
{
add { }
remove { }
}
// Comment over Main()...
public static void Main()
{
}
}
|
|
From: Gaurav V. <mas...@us...> - 2003-02-18 11:51:14
|
Update of /cvsroot/csdoc/csdoc/src/tests
In directory sc8-pr-cvs1:/tmp/cvs-serv5873
Added Files:
test.cs
Log Message:
2003-02-18
* test.cs : First test for csdoc.
--- NEW FILE ---
using System;
/**
* <summary>Hello</summary>
*/
public class Test
{
// Can I collect the Main comment?
public event EventHandler HandleTest
{
add { }
remove { }
}
public static void Main()
{
}
}
|