You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by "Andrew C. Oliver" <ac...@apache.org> on 2002/12/12 21:02:02 UTC

[RT] Reactive formula parser (esp Avik)

Hi All,

I find myself ill-motivated to work on formulas lately and I think I 
know why.  We've seperated the issues in the formula parser poorly based 
on my earlier incorrect assumptions which makes it a real pain to work 
on.  Avik has done a fine job on the parser but I think we need to 
seperate out some of the extra things its doing.

I suggest:

FormulaParser
   Role: parses strings and throws token events

PTGParser
   Role: parses PTGs and throws token events

FormulaDigester
   Role: receives token events and outputs PTGs in RPN

PTGDigester
   Role: receives token events and outputs formula strings

Token:
   Role: Symbolic represnetation of a parsed portion of an expression.

PTG
   Role: Binary representation created by PTG Digester no direct 
correllation to tokens.

The goal is to seperate out the areas of concern.  PTGs don't directly 
correspond to tokens in the formula string and vise versa.  The order is 
therefore not *directly* RPN.  This more distributed system should make 
it easier to do IFs and other constructs.

What do you guys think, esp Avik?  Any additional formula volunteers?

Thanks,

Andy



Re: [RT] Reactive formula parser (esp Avik)

Posted by Avik Sengupta <av...@itellix.com>.
I do think separation of concerns is a good thing, generally, and in
relation to the formula code. 

What i still havent come to grips with is the relation that we will have
between the Token class and the PTG class .. actually dont know if its a
concern at all.. need to think about this.

Separating the parser and digester is generally a good idea, with the
only caveat that we'll have to be carefull not to create unnecessary
objects. 

Anyway, am going away on vacation tonight, will refactor away next
weekend onwards.  

On Fri, 2002-12-13 at 01:32, Andrew C. Oliver wrote:
> Hi All,
> 
> I find myself ill-motivated to work on formulas lately and I think I 
> know why.  We've seperated the issues in the formula parser poorly based 
> on my earlier incorrect assumptions which makes it a real pain to work 
> on.  Avik has done a fine job on the parser but I think we need to 
> seperate out some of the extra things its doing.
> 
> I suggest:
> 
> FormulaParser
>    Role: parses strings and throws token events
> 
> PTGParser
>    Role: parses PTGs and throws token events
> 
> FormulaDigester
>    Role: receives token events and outputs PTGs in RPN
> 
> PTGDigester
>    Role: receives token events and outputs formula strings
> 
> Token:
>    Role: Symbolic represnetation of a parsed portion of an expression.
> 
> PTG
>    Role: Binary representation created by PTG Digester no direct 
> correllation to tokens.
> 
> The goal is to seperate out the areas of concern.  PTGs don't directly 
> correspond to tokens in the formula string and vise versa.  The order is 
> therefore not *directly* RPN.  This more distributed system should make 
> it easier to do IFs and other constructs.
> 
> What do you guys think, esp Avik?  Any additional formula volunteers?
> 
> Thanks,
> 
> Andy
> 
> 
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
>