I'm done *yaaaawwwn*

Topics: Developer Forum
Aug 14, 2008 at 4:21 AM
I finally finished applying all these changes. To test it, you should choose the "Test" project as start project, leave the working directory blank and use the following command arguments:
-C "..\..\..\mono test files"
This will parse, unparse, compile and execute all mono test files and tell you whether it succeeded or not. At the end all errors are again printed as an overview.
To parse and unparse csparser with itself use:
-F "..\..\..\cslexer"
You can then copy some missing files from the original project into the subfolder created in test program\bin\debug\ and compile it with Visual Studio.

The -F option should probably be given a path, where to store the files. Currently it only works, if the source path starts with "..\..\..\".

As far as I can remember, there are some newer mono test files (not in the mono test files folder, yet) which cause problems with generic parsing.

I'll go to bed now... and try to ignore that the sun is already climbing up to the horizon...

So, Dmitri you're free to start refactoring. I left quite a mess of tabs and spaces there ;)
Aug 14, 2008 at 5:13 AM
Awesome, I've been following your checkins, looks great.. also nice to see the speed increases : ). I'm sure many people will appreciate the effort there!

Maybe it would be a good time for a release version?

Aug 14, 2008 at 7:23 AM
I totally agree. It's good to remember that since CodePlex was restructured, there is now a download button on the main page. It would be nice to give people the latest, 2.0-compliant binaries.
Aug 14, 2008 at 9:34 AM
ok, I've added a new release, I'll retire that old old one there as well : ). I defaulted to the source and binary in the download...
Aug 15, 2008 at 12:09 PM
Thanks ;D
I'm really amazed, that you instantly threw out a release! This made me really happy ;)

But I would have suggested some more testing with real projects before releasing it. I just tried it with one of my projects, GrGen.NET, and found two files that were crashing the parser (I didn't try to compile the results, yet).
I added a "tests" folder with a "should_pass" and "should_fail" subfolder to the repository, where the essence of the crashes reside.
Could somebody please have a look at them?
Aug 15, 2008 at 4:35 PM
I'll have a look for today...

It is a x.0 release, so the odd issue is allowed right ; ).
Aug 15, 2008 at 5:27 PM
for pass000_array_of_arraytypes.cs, it seems that Parser.cs > ParseType is not checking for rankSpecifiers -- [,,]. Trying to figure out if there implications for the generics code there...

Aug 15, 2008 at 5:57 PM
the comment and doc comment code seems to be a bit out. The Advance method is currently swallowing comments and multicomments, however there are a few tests for comments in the code. The advance should be swallowing doc comments as well I think, as they can legally appear everywhere. If we want to attach doc comments to methods/classes etc, I think we should have the advance method store the last doc comment (all lines of it), and then check for that when we know it is valid. So for example store the text, start and end tokens for the doc comment, then when hitting a method, check if there is an existing valid doc comment. That might all be better handled in a second pass too. I worked on the doc comments in Aptana and we actually used a parser that could change languages on the fly : ). Still iirc we stored them all and matched them up with methods post parse.

The main issue though is a doc comment is valid at any point in the source, so we really do need to handle it in the advance I think. I will just skip them for now unless anyone has objections...
Aug 15, 2008 at 8:11 PM
fixed and uploaded the comments bug, looking at ParseType again. Man, I need a better source control client than cpc... I'll move these to the issue tracker : )