Hi In an earlier version of my language, I had to parse range of integers in various base. Now I want to include float. I have read http://www.antlr.org/wiki/display/ANTLR3/Lexer+grammar+for+floating+point,+dot,+range,+time+specs but I've still got some questions.
All the work seems to be done at the lexer level so the type of the following tokens will be as example: 5 : DECIMAL_LITTERAL 07 : OCTAL_LITTERAL 7.5: FLOATING_POINT_LITTERAL 5..7 : DOTDOT In the last example, the result is not very convenient because I will still have to extract the bounds and compute their type by myself which seems quite redundant with the job performed by the lexer. May be I am missing something ? I would rather be able to express the range at the parser level which seems much more convenient to me: range: FLOATING_POINT_LITTERAL DOTDOT FLOATING_POINT_LITTERAL. In this way, I will also be able to manage the possible spaces between the bounds and the DOTDOT. So, am I right to try to parse range at the parser level ? Or is there a solution to extract easily the bounds with their type if I am doing the job at the lexer level ? Thanks in advance, Fabien. List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address -- You received this message because you are subscribed to the Google Groups "il-antlr-interest" group. To post to this group, send email to il-antlr-inter...@googlegroups.com. To unsubscribe from this group, send email to il-antlr-interest+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/il-antlr-interest?hl=en.