W3C home > Mailing lists > Public > public-qt-comments@w3.org > February 2004

ORA-XQ-150-B: pushState() after changing state does not do what you want it to

From: Stephen Buxton <Stephen.Buxton@oracle.com>
Date: 16 Feb 04 13:31:19
Message-Id: <200402162131.i1GLVJb01421@rgmgw4.us.oracle.com>
To: public-qt-comments@w3.org
Cc:

SECTION A.2.2: lexical rules

DEFAULT state, on input "(:", has transition to 
EXPR_COMMENT followed by pushState().  I interpret this to mean
the current state is changed from DEFAULT to EXPR-COMMENT, 
and then the current state (now EXPR_COMMENT) is pushed on
top of the stack. We continue executing in EXPR_COMMENT state.
On input ":)",
the transition is popState(), which seemingly means that the 
EXPR_COMMENT state that is on the stack is popped and becomes the
current state.  This looks wrong.  Don't we want to go to 
whatever state we were in before the comment?  In that case,
shouldn't the transition in DEFAULT state on input "(:"
be pushState(DEFAULT) followed by entering EXPR_COMMENT state?
Based on this example, I question whether any of the transitions
should have pushState() as the second step.  It makes more sense
to do pushState() before changing the current state rather than
after.  This whole question of order of actions can be avoided
by always pushing an explicit state.  Each table knows what
state is the current state, so you can just push that state
explicitly when you want to push the pre-existing current state.


- Steve B.
Received on Monday, 16 February 2004 16:31:22 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:45:17 UTC