EXP should be [eE](-|+)?(INT1)
On Monday, June 27, 2016 at 11:20:16 AM UTC-4, gmhwxi wrote: > > > Let > > INT0 = [0-9]* > INT1 = (0 | [1-9](INT0)) > DOT = [.] > EXP = [eE](INT1) > > Then FLOAT is > > (INT1)(EXP) | (INT1)(DOT)(INT0)(EXP)? | (DOT)(INT1)(EXP)? > > There are also hexadecimal floating point numbers: > > HEX0 = [0-9a-z]* > HEX1 = (0 | [1-9a-z](HEX0)) > DOT = [.] > EXP = [pP](INT1) > > HEXFLOAT = (HEX1)(EXP) | (HEX1)(DOT)(HEX0)(EXP?) | (DOT)(HEX1)(EXP?) > > In C, EXP? should be EXP for hexadecimal floating point numbers. > > On Monday, June 27, 2016 at 4:06:42 AM UTC-4, Artyom Shalkhakov wrote: >> >> I'm doing a syntax highlighter for ATS based on the Monarch editor (used >> in Visual Studio Code) and I'm interested to know what's the lexical >> grammar for floating-point constants? >> >> I've tried looking through the lexer source code, but I find it quite >> complicated. I'd like some help on this one. >> > -- You received this message because you are subscribed to the Google Groups "ats-lang-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to ats-lang-users+unsubscr...@googlegroups.com. To post to this group, send email to ats-lang-users@googlegroups.com. Visit this group at https://groups.google.com/group/ats-lang-users. To view this discussion on the web visit https://groups.google.com/d/msgid/ats-lang-users/7fbc43f0-ff7d-4edb-9c78-963b3e0422e7%40googlegroups.com.