Menu

#24 Look Ahead Reduction Methods need to account for null.

1.0
open
None
2014-03-09
2014-03-09
Bryson
No

FIXED -

Your id reduction method isn't correct. You need to account for your nextToken variable to be null as in you just have ID. You're gonna want to take that into account for all reductions involving look-ahead. Also for look-ahead you want to be looking at the next token on the programStack and not the holdStack since you haven't processed the L_BRACKET yet. Don't forget to put the nextToken variable back on the programStack when you're done looking at it.

Discussion

  • Bryson

    Bryson - 2014-03-09
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1 +1 @@
    -Your id reduction method isn't correct. You need to account for your nextToken variable to be null as in you just have ID. You're gonna want to take that into account for all reductions involving look-ahead. Also for look-ahead you want to be looking at the next token on the programStack and not the holdStack since you haven't processed the L_BRACKET yet.
    +Your id reduction method isn't correct. You need to account for your nextToken variable to be null as in you just have ID. You're gonna want to take that into account for all reductions involving look-ahead. Also for look-ahead you want to be looking at the next token on the programStack and not the holdStack since you haven't processed the L_BRACKET yet. Don't forget to put the nextToken variable back on the programStack when you're done looking at it.
    
     
  • CJ McGuire

    CJ McGuire - 2014-03-09
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1 +1,3 @@
    +FIXED - 
    +
     Your id reduction method isn't correct. You need to account for your nextToken variable to be null as in you just have ID. You're gonna want to take that into account for all reductions involving look-ahead. Also for look-ahead you want to be looking at the next token on the programStack and not the holdStack since you haven't processed the L_BRACKET yet. Don't forget to put the nextToken variable back on the programStack when you're done looking at it.
    
     

Log in to post a comment.

MongoDB Logo MongoDB