CPSC 425 Spring 2006
HW 5: More Top Down Parsing

  1. Construct an LL(1) parse table for the following grammar:
    <S> -> - <Num>
    <S> -> <Num>
    <Num> -> <Digits><FracPart>
    <FracPart> -> empty
    <FracPart> -> . <Digits>
    <Digits> -> <Digit><DigitTail>
    <DigitTail> -> <Digit><DigitTail>
    <DigitTail> -> empty
    <Digit> -> 0|1|2|...|9
    

  2. Use your table to show a complete parse of each string below:
    1. 6
    2. 63.4
    3. .25