[antlr-interest] CSharp target problems

Ruth Karl ruth.karl at gmx.de
Thu Jun 7 07:15:45 PDT 2007


Hi all,  :-)

I have the same problem...
Any hint, solution or workaround yet? (In case someone answered already 
and I missed it: sorry for asking again...)

I wrote the following test method for my grammar:

   static void Main()
        {

            string dir = @"D:\TestCases";
            DirectoryInfo info = new DirectoryInfo(dir);
            FileInfo[] files = info.GetFiles();
            foreach (FileInfo fi in files)
            {
                System.IO.FileStream fs = new FileStream(fi.FullName, 
FileMode.Open);
                Console.WriteLine("Parsing {0}...", fs.Name);
                Antlr.Runtime.ANTLRInputStream input = new 
Antlr.Runtime.ANTLRInputStream(fs);
                JSPLexer lexer = new JSPLexer(input);
                Antlr.Runtime.CommonTokenStream tokens = new 
Antlr.Runtime.CommonTokenStream(lexer);
                JSPParser parser = new JSPParser(tokens);
                parser.jsp();
            }
        }

This hangs at the line where the constructor of 
Antlr.Runtime.ANTLRInputStream is called - so I am not able to debug my 
grammar at all :'(
(ANTLRWorks won't debug C#-target, either...)

I am working on Vista, VS 2005, antlr3.runtime with runtime version 
v2.0.50727 and version 0.3.0.37313.

Thanks & cheers,

Ruth


Robin Davies schrieb:
> I'm now trying to bring up my grammar in c#.
>  
>
>     System.IO.Stream fileStream = new 
> System.IO.FileStream(file,FileMode.Open);
>
>     ANTLRInputStream input = new 
> ANTLRInputStream(fileStream,Encoding.UTF8);
>
> The constructor appears to hang. I'm using the CSharp runtime out of 
> the source distribution (which is distributed in compiled form).
>
> Where can I find the sources for the C# antlr runtime? All I can find 
> is the binaries.
>
> Thanks in advance.
>
>  
>
>  
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20070607/e4bd7e2b/attachment.html 


More information about the antlr-interest mailing list