[antlr-interest] C# working version

Robin Debreuil robin at debreuil.com
Fri Mar 5 11:44:14 PST 2004


Hey Alex,

Thanks a ton for the feedback : ). I am using 2.72 with mostly the csc
command line compiler (v 7.00.9466). Once in a while I also use VS.Net, when
trying to trace stuff mostly. I had modified a few of the antlr classes, but
afaik (hopefully!) I had changed everything back. I did also apply a
downloadable patch the the C# stuff at one point - maybe that fixed what
Micheal had mentioned? I don't get that line when it generates the cs
anyway, and I certainly didn't fix it ; ).

I had noticed the parsing the parser would hang, but I (think) I could get
each section to parse. The line you mentioned, if I have it right [1], will
parse if you wait a looong time. That isn't to say it isn't a bug, but more
likely its the way I'm going about parsing (in that it dies on very long
recursive stuff). The dark art of optimizing is still a bit of a grey area
to me I'm afraid...

How do you go about isolating the problem parts of a parse? I have to just
delete/comment sections until I can isolate the problem - it seems you use a
better way...? I can usually find the error after a while, but all bets are
off on what line number it was : ).

Thanks again,
Robin


[1] (wrapped...)

class StmtTests
{
 public int TestMeth()
 {
  catch_clause_AST = (AST)astFactory.make( (new
ASTArray(4)).add((AST)astFactory.make( (new
ASTArray(1)).add((DDW.CSharp.CatchClause)
astFactory.create(CatchClause)))).add((AST)astFactory.make( (new
ASTArray(2)).add((DDW.CSharp.TypeRef)
astFactory.create(TypeRef)).add(tp_AST))).add(id_AST).add((AST)astFactory.ma
ke( (new ASTArray(2)).add((DDW.CSharp.Statements)
astFactory.create(Statements)).add(st_AST))));
 }
}


> Hello Robin!
>
> I try your parser.
> 1. CSharpLexer.cs(402) not compiled under MSVC# in one line.
> override public new Token nextToken()
> and compiled after new keyword removed:
> override public Token nextToken().
> This line is generated by ANTLR/C#.
> 2. Parser runs infinite when try parse line at CSharpParser.cs(8191).
> 3. What are you using to work with C#?
>
> Alex.
>




 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
     http://groups.yahoo.com/group/antlr-interest/

<*> To unsubscribe from this group, send an email to:
     antlr-interest-unsubscribe at yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
     http://docs.yahoo.com/info/terms/
 



More information about the antlr-interest mailing list