On Tue, 2008-11-25 at 13:35 +0100, [EMAIL PROTECTED] wrote: > Hey > I am having a rather hard time figuring our how to let the tree find my > parser. > I use the ANTLR work and have tree files in the following way: > FooLexer (lexer grammar FooLexer) > FooParser (parser grammar FooParser) > FooTree (tree grammar FooTree) > > In my parser I have: > tokenVocab = FooLexer; > > In my tree I have: > tokenVocab = FooParser; > > But here things goes wrong, when I use the ANTLR debugger on the Tree file > it complains and gives the following output: > error cannot read: "path"/FooParserLexer.java > error cannot read: "path"/FooParserParser.java > > and no wonder it can't because the files are named FooLexer.java and > FooParser.java > Can anyone tell me what I have done wrong ?
Assuming that you are using the latest release of ANTLRWorks (check that), check the following: 1) Is your ANTLRWorks working directory set to somewhere sensible, that you can read and write to etc (general permissions); 2) Filenames are correct: FooLexer.g contains lexer grammar FooLexer; FooParser.g contains parser grammar FooParser; 3) The generated java files are in the correct place. 4) You are debugging the tree grammar remotely (you cannot debug tree grammars locally, at least not at the moment - generate with -debug, run the program, connect the remote debugger to it); If the suffixes Lexer and Parser are being appended, it implies that you have 'grammar FooParser' rather than 'parser grammar FooParser'. Could be a bug, but it is one I have never come across myself if it is. My feeling is that you are are trying to debug the tree grammar locally. Jim > > Kind regards and thanks > Kasper Revsbech > > > > List: http://www.antlr.org:8080/mailman/listinfo/antlr-interest > Unsubscribe: > http://www.antlr.org:8080/mailman/options/antlr-interest/your-email-address > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "il-antlr-interest" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/il-antlr-interest?hl=en -~----------~----~----~----~------~----~------~--~---
List: http://www.antlr.org:8080/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org:8080/mailman/options/antlr-interest/your-email-address
