Changeset 2737

Show
Ignore:
Timestamp:
08/23/08 09:57:10 (15 months ago)
Author:
sukyoungryu
Message:

[parser] Numerals contain no more than one '.' character.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/ProjectFortress/src/com/sun/fortress/parser/Literal.rats

    r2598 r2737  
    9393 
    9494transient FloatLiteralExpr FloatLiteralExpr = 
    95     <FIRST> a1:DigitString dot a2:DigitString 
     95    <ErrorProduction> DigitString dot DigitString (dot DigitString)+ 
     96    { yyValue = syntaxError(createSpan(yyStart,yyCount), 
     97                            "Numerals contain no more than one `.' character."); 
     98    } 
     99  / <FIRST> a1:DigitString dot a2:DigitString 
    96100    { yyValue = ExprFactory.makeFloatLiteralExpr(createSpan(yyStart,yyCount), 
    97                                                  a1 + "." + a2); }; 
     101                                                 a1 + "." + a2); 
     102    }; 
    98103 
    99104transient IntLiteralExpr IntLiteralExpr =