[il-antlr-interest: 28362] Re: [antlr-interest] Mutual left recursive problem
On Thu, Mar 25, 2010 at 9:19 AM, foxterri foxterri foxter...@hotmail.comwrote: Hi I have this left recursive problem which i cannot figure out how to solve and ANTLR WORKS cannot recognize the left recursive problem. There is no left recursive rule in the part of your grammar you posted. Can you post, or attach, the complete grammar? Regards, Bart. 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-inter...@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: 28363] [antlr-interest] Mutual left recursive problem
Hi I have this left recursive problem which i cannot figure out how to solve and ANTLR WORKS cannot recognize the left recursive problem. There is no left recursive rule in the part of your grammar you posted. Can you post, or attach, the complete grammar? Regards, Bart. The complete grammer is attached, it is not completely done, but should give a good overview of it. debugging it in eclipse gives the following error: error(210): The following sets of rules are mutually left-recursive [primaryNoNewArray, arrayAccess, methodInvocation, primary, fieldAccess] _ The New Busy is not the old busy. Search, chat and e-mail from your inbox. http://www.windowslive.com/campaign/thenewbusy?ocid=PID27925::T:WLMTAGL:ON:WL:en-US:WM_HMP:032010_3 List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address lexpars.g Description: Binary data -- 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-inter...@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: 28366] [antlr-interest] (no subject)
Hello, I have to develop a tool which makes the generation of a specification in CSP-Z from a specification Z, It is possible to use your tool ANTLR to introduce the grammar of language Z and the grammar of language CSP-Z and rules which I have already defined textuellement and what is that I obtain a code or this tool makes the generation he even? please answer me it rather possible please thanks 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-inter...@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: 28367] Re: [antlr-interest] strange MismatchedTokenException
On Thu, Mar 25, 2010 at 10:00 AM, Simon zack simonz...@gmail.com wrote: hi, I'm new to antler tried writing a little grammer, but it tells me MismatchedTokenException when I interpret namespace_specification using the string: hello.world Then you start interpreting hello.world with the 'exception_info' rule, which only matches the string '.exception'. You probably meant to start interpreting with the 'namespace_specification' rule, whcih matches hello. from hello.world. Regards, Bart. 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-inter...@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: 28368] [antlr-interest] NoViableAltException this time
tried using namespace_specification to interpret the string, but the error still shows up I changed the code a little, but a new exception pops up this only works when I remove the exception_info, however adding it messes up things [code] grammar test; exception_info : '.exception' ; namespace_specification : ns_id1 = IDENTIFIER ('.' ns_idx = IDENTIFIER)* //ns_id1 = IDENTIFIER ( '.' ns_idx = IDENTIFIER)* ; IDENTIFIER :LETTER (LETTER|'0'..'9')* ; fragment LETTER :'$' |'A'..'Z' |'a'..'z' |'_' ; [/code] thanks 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-inter...@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: 28370] [antlr-interest] Lexer rule for strings with quoted strings within
Hi, I've been trying to write a lexer rule for strings with strings in them, like This has a quoted string within Is there a simple lexer rule for this, or do I need some kind of look ahead? Thanks Anders 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-inter...@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: 28371] Re: [antlr-interest] NoViableAltException this time
Sorry about that, indeed, hello.world works fine, but I forgot to mention that I changed the interpreter string this time Changed it to hello.event This is what generated the error sorry, should've made things clearer regards simon 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-inter...@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: 28372] Re: [antlr-interest] Lexer rule for strings with quoted strings within
On Thu, Mar 25, 2010 at 2:01 PM, Anders Sollander anders.sollan...@mathworks.de wrote: Hi, I've been trying to write a lexer rule for strings with strings in them, like This has a quoted string within Is there a simple lexer rule for this, or do I need some kind of look ahead? You could enable the `backtrack` option: String options { backtrack = true; } : '' ('' | ~'')+ '' ; Regards, Bart. 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-inter...@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: 28373] Re: [antlr-interest] Lexer rule for strings with quoted strings within
On Thu, Mar 25, 2010 at 2:50 PM, Bart Kiers bki...@gmail.com wrote: On Thu, Mar 25, 2010 at 2:01 PM, Anders Sollander anders.sollan...@mathworks.de wrote: Hi, I've been trying to write a lexer rule for strings with strings in them, like This has a quoted string within Is there a simple lexer rule for this, or do I need some kind of look ahead? You could enable the `backtrack` option: String options { backtrack = true; } : '' ('' | ~'')+ '' ; Regards, Bart. Sorry, I should first test what I propose, it doesn't seem to work... Regards, Bart. 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-inter...@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: 28374] Re: [antlr-interest] Lexer rule for strings with quoted strings within
On Thu, 2010-03-25 at 14:52 +0100, Bart Kiers wrote: On Thu, Mar 25, 2010 at 2:01 PM, Anders Sollander anders.sollan...@mathworks.de wrote: Hi, I've been trying to write a lexer rule for strings with strings in them, like This has a quoted string within Is there a simple lexer rule for this, or do I need some kind of look ahead? fragment PART : '' (options{ greedy=false; }: .)* '' ; STRING : PART+ ; 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-inter...@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: 28382] Re: [antlr-interest] [C target] How to create preprocessor?
Please see the example C parser in the C subdirectory of the downloadable examples tar on the download page. It implements the include statement simply but shows how to use stacked input streams which are built in to the v3 C target. Jim -Original Message- From: antlr-interest-boun...@antlr.org [mailto:antlr-interest- boun...@antlr.org] On Behalf Of Ìèõàèë Þðóøêèí Sent: Thursday, March 25, 2010 11:02 AM To: antlr-interest@antlr.org Subject: [antlr-interest] [C target] How to create preprocessor? Good day, I want to parse 'include stmt'. I have found good article for old antlr. http://www.ibm.com/developerworks/aix/library/au- c_plusplus_antlr/index.html. But I work with Antlr 3, C target. And I haven't found any interface like TokenStreamSelector.. 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-inter...@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: 28384] Re: [antlr-interest] NoViableAltException this time
Still can't figure this out This time I looked at the lexer code generated and it seems that after the DOT whenever it encounters 'e' it matches '.exception_info' this is strange, as I thought the default of antlr matching was greedy Why should it resort to another rule when the current subrule matches? This is non-greedy behavior regards, simon 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-inter...@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.