[antlr-interest] Repost: ANTLRworks: Why do these rules behave differently in the embedded interpreter?

kferrio at gmail.com kferrio at gmail.com
Sat Jan 2 11:25:08 PST 2010


Thanks, Gavin.  Sorry to top-post, but I think it might be clearer than multiply  interspersed remarks.  

I think you understood my logic.  If anyone is unclear, it's me.  

I take your point about what the debugger already does, which invites the question 'why does the interp need to be distinct from the debugger?'  

Your point about remote debugging is also well taken.  So maybe my question should be, when would I want the interp?   Do you guys really use it?

 Since I challenged the correctness of the interp, the implication was that it needs fixing.  But if it's not the right tool for me in the first place then it does not need fixing.  My bad.  It's more about expectations (soft requirements) than about correctness.  I know of two people in addition to myself who have/had perfectly plausible but perhaps inappropriate expectations of the interpreter.  If we are not uniquely misguided then the question may be more than an academic curiosity.  

I'm sure people who live and breath antlr would not be confused.  Occasional users like me may not be so expert.

Thanks for setting me straight about the debugger.   I'm slow but deliberate.  :)

Kyle 

------Original Message------
From: Gavin Lambert
To: Kyle Ferrio
To: Terence Parr
Cc: ANTLR Interest Mailing List
Subject: Re: [antlr-interest] Repost: ANTLRworks: Why do these rules behave differently in the embedded interpreter?
Sent: Jan 2, 2010 3:11 AM

At 14:53 2/01/2010, Kyle Ferrio wrote:
 >So, I thought, why not just build and run the target?
 >Sure, codegen takes a second, and compiling to bytecode takes
 >another second.  So what?  Small price for knowing it's right.
 >Ok, but what about drawing concrete syntax trees?  No problem,
 >just insert actions.

Either I'm misinterpreting what you're talking about, or you're 
describing what the ANTLRWorks debugger already does.

 >In fact, it might even be possible to make predicates work in
 >such an interp, by either "gating off" the callbacks or just
 >"marking in the debugger" when we're processing a predicate.

The problem with predicates is that they're arbitrary target 
language code; ANTLR simply doesn't have enough information to 
emulate their functionality (for semantic predicates, at least; 
syntactic predicates could be dealt with correctly).  But that's 
what the Debug Remote feature is for.



Sent from my Verizon Wireless BlackBerry


More information about the antlr-interest mailing list