Hello, guys !
Just an observation: We developed a descent recursive parser that is most close to the strategy of mouse. If we see a "too much complex" expression we create helper functions to deal with sub-expressions and then we build the parser to the whole expression on top of those.
We could attempt a strategy more close to a state machine. So whenever a we a expression
like e1 (e2/ e3)* e4 we could do something like this:
e1(); do{ e2(); if(try_alternate()){ e3(); } }while(last_result_is_true); e4();
The main difference will be noticed on the number and size of functions generated.
I don't know if there will be any impact on efficiency, but think it is worth to try !
Att.
Elton M. Cardoso
Hello, guys ! Just an observation: We developed a descent recursive parser that is most close to the strategy of mouse. If we see a "too much complex" expression we create helper functions to deal with sub-expressions and then we build the parser to the whole expression on top of those. We could attempt a strategy more close to a state machine. So whenever a we a expression like e1 (e2/ e3)* e4 we could do something like this:
e1(); do{ e2(); if(try_alternate()){ e3(); } }while(last_result_is_true); e4();
The main difference will be noticed on the number and size of functions generated. I don't know if there will be any impact on efficiency, but think it is worth to try ! Att. Elton M. Cardoso