[il-antlr-interest: 23835] first nite sex in honey moon cute couples
first nite sex in honey moon cute couples http://moneyearn2online.com http://moneyearn2online.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "il-antlr-interest" group. To post to this group, send email to il-antlr-interest@googlegroups.com To unsubscribe from this group, send email to il-antlr-interest+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/il-antlr-interest?hl=en -~--~~~~--~~--~--~---
[il-antlr-interest: 23836] [antlr-interest] Island Grammars with identical tokens
I have a main grammar that passes control to two different island grammars to parse a language. One island grammar is an island because it's so big and can be used in a context outside the main language, and the other island has vastly different lexer rules (whitespace isn't ignored, etc.). All three generate ASTs for processing by a follow-on tree parser. As such, I need the lexer token numbers to match for all three lexers. It seems like this is problematic; I thought if I modified the .tokens files they would be used as input files to the ANTLR generator; this appears to be false...i.e. they are generated from the .g file each time. Does anybody have any advice? It's like I need to specify a global tokens {...} and block of lexer rule names, so that the generated files all use the same set of numbers. Maybe it's possible for me to make a "base" lexer class that mentions all the token names and has overridable lexer rules. Not sure if that can even happen. Thanks in advance for any tips... -- Mike J. Bell on gmail List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/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 il-antlr-interest@googlegroups.com To unsubscribe from this group, send email to il-antlr-interest+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/il-antlr-interest?hl=en -~--~~~~--~~--~--~---
[il-antlr-interest: 23837] Re: [antlr-interest] Island Grammars with identical tokens
On Thu, May 21, 2009 at 11:42 PM, Mike J. Bell wrote: > I have a main grammar that passes control to two different island > grammars to parse a language. One island grammar is an island because > it's so big and can be used in a context outside the main language, > and the other island has vastly different lexer rules (whitespace > isn't ignored, etc.). > > All three generate ASTs for processing by a follow-on tree parser. As > such, I need the lexer token numbers to match for all three lexers. > It seems like this is problematic; I thought if I modified the .tokens > files they would be used as input files to the ANTLR generator; this > appears to be false...i.e. they are generated from the .g file each > time. > > Does anybody have any advice? It's like I need to specify a global > tokens {...} and block of lexer rule names, so that the generated > files all use the same set of numbers. Maybe it's possible for me to > make a "base" lexer class that mentions all the token names and has > overridable lexer rules. Not sure if that can even happen. > > Thanks in advance for any tips... You should be able to use the importVocab option to specify a common .tokens file for all lexers to import. Or you can chain the lexers by having one island grammar import the vocab of the other and then have the main grammar import that island grammars vocab. That will avoid the need to keep the manually generated common token file in sync. Though then you will need to check if ANTLR's build ordering can handle this dependency or else make sure you enforce the build order manually or tokens will get out of sync. Tom. > > -- > Mike J. Bell on gmail > > List: http://www.antlr.org/mailman/listinfo/antlr-interest > Unsubscribe: > http://www.antlr.org/mailman/options/antlr-interest/your-email-address > List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/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 il-antlr-interest@googlegroups.com To unsubscribe from this group, send email to il-antlr-interest+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/il-antlr-interest?hl=en -~--~~~~--~~--~--~---
[il-antlr-interest: 23838] Re: [antlr-interest] Island Grammars with identical tokens
On Thu, May 21, 2009 at 10:24 AM, Thomas Brandon wrote: > You should be able to use the importVocab option to specify a common > .tokens file for all lexers to import. Or you can chain the lexers by > having one island grammar import the vocab of the other and then have > the main grammar import that island grammars vocab. That will avoid > the need to keep the manually generated common token file in sync. > Though then you will need to check if ANTLR's build ordering can > handle this dependency or else make sure you enforce the build order > manually or tokens will get out of sync. You meant tokenVocab...thanks, this did the trick!!! (I get warnings about "no lexer rule corresponding to token ..." but the generated code seems to be OK). Thanks!!! -- Mike J. Bell on gmail List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/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 il-antlr-interest@googlegroups.com To unsubscribe from this group, send email to il-antlr-interest+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/il-antlr-interest?hl=en -~--~~~~--~~--~--~---
[il-antlr-interest: 23839] [antlr-interest] Rewrite a list to a set of trees
Hello, To make checking and generating easier, I would like to parse lines like the following: node n1, n2, n3; And turn them into trees like this: (VAR 'node' 'n1') (VAR 'node' 'n2') (VAR 'node' 'n3') At the moment I'm using the following rules to parse, but this obviously does not generate the result I would like to have: var_declaration : var_type id_list -> ^(VAR var_type id_list) ; id_list : IDENTIFIER (COMMA! id_list)? ; Obviously, this generates trees like this: (VAR 'node' 'n1' 'n2' 'n3') Could anyone point me in a direction that allows me to end up with trees like I described above? If this is at all possible ;) Thanks a lot! Olaf Keijsers List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/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 il-antlr-interest@googlegroups.com To unsubscribe from this group, send email to il-antlr-interest+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/il-antlr-interest?hl=en -~--~~~~--~~--~--~---
[il-antlr-interest: 23840] [antlr-interest] C++ Question
I noticed on the Wiki that "C++ classes will be provided as a separate library later in 2008." Does antlr3 now produce C++ using classes now or is still just C that is compiled using a C++ compiler? Thanks in advance for the information. Thomas Jackson List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/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 il-antlr-interest@googlegroups.com To unsubscribe from this group, send email to il-antlr-interest+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/il-antlr-interest?hl=en -~--~~~~--~~--~--~---
[il-antlr-interest: 23841] [antlr-interest] some questions about C runtime
Good evening! I have IR, that was written in C++. But there is only C runtime. 1) How can I add "namespaces block" in *.c file? 2) Is it possible to create some (e.g. 2) objects of ParserClass (or LexerClass)? Yacc, as I know, generates C code with global variables. So.. what about antlr? -- Написано в почтовом клиенте браузера Opera: http://www.opera.com/mail/ List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/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 il-antlr-interest@googlegroups.com To unsubscribe from this group, send email to il-antlr-interest+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/il-antlr-interest?hl=en -~--~~~~--~~--~--~---
[il-antlr-interest: 23842] Re: [antlr-interest] some questions about C runtime
Yurushkin Michael wrote: > Good evening! > I have IR, that was written in C++. But there is only C runtime. > Just compile as C++, the code is c++ compilable. > 1) How can I add "namespaces block" in *.c file? > add to @members {} and that shoudl work I think. > 2) Is it possible to create some (e.g. 2) objects of ParserClass (or > LexerClass)? Yes, but you need to do it manually. > Yacc, as I know, generates C code with global variables. So.. > what about antlr? > No global variables, it is all 100% thread safe. Jim List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/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 il-antlr-interest@googlegroups.com To unsubscribe from this group, send email to il-antlr-interest+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/il-antlr-interest?hl=en -~--~~~~--~~--~--~---
[il-antlr-interest: 23851] Re: [antlr-interest] Rewrite a list to a set of trees
> Hello, > > To make checking and generating easier, I would like to parse > lines like the > following: > node n1, n2, n3; > > And turn them into trees like this: > (VAR 'node' 'n1') > (VAR 'node' 'n2') > (VAR 'node' 'n3') > > At the moment I'm using the following rules to parse, but > this obviously does not generate the result I would like to have: > var_declaration : var_type id_list -> ^(VAR var_type id_list) ; > > id_list : IDENTIFIER (COMMA! id_list)? ; > > Obviously, this generates trees like this: > (VAR 'node' 'n1' 'n2' 'n3') > > Could anyone point me in a direction that allows me to end up > with trees like I described above? If this is at all possible ;) > > Thanks a lot! > > Olaf Keijsers As long as you're not trying to do anything more complex than exactly what you describe, this is fairly trivial to do with a rule that looks something like this: var_decl_list : TYPENAME ids+=IDENTIFIER (',' ids+=IDENTIFIER)* -> ^(VAR_DECL TYPENAME IDENTIFIER)+ ; If your rule can't be reduced to a one-liner like that though (e.g. C declarations), things quickly get complicated, and I've yet to determine a good, general way of handling it. You'll probably want to look into ANTLR's rule parameters and return values in that case. -- Gary R. Van Sickle List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/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 il-antlr-interest@googlegroups.com To unsubscribe from this group, send email to il-antlr-interest+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/il-antlr-interest?hl=en -~--~~~~--~~--~--~---