Hi, 2011/8/6 Rui Maciel <rui.mac...@gmail.com>: > Let's consider the following regex pattern: > > natural = "0"|[1-9][0-9]*; > [-+]?natural "." [0-9]+ ([Ee] [+-]?[0-9]+)? { return > TT_FLOAT_NUMBER; } > [^] { return TT_UNKNOWN; } > > Now, consider the following string: > > 2e+09 > > > The code generated by re2c interprets this string as being > TT_FLOAT_NUMBER (the string "2") followed by TT_UNKNOWN (the string > "e+09"). > > Is there a way to use re2c in order to generate code that performs a > greedy pattern match, which returns a TT_FLOAT_NUMBER with the string > ""2e+09"? > >
Note your regex pattern for TT_FLOAT_NUMBER uses "." (dot), and the supplied input doesn't have it. -- Regards, Felipe Pena ------------------------------------------------------------------------------ BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA The must-attend event for mobile developers. Connect with experts. Get tools for creating Super Apps. See the latest technologies. Sessions, hands-on labs, demos & much more. Register early & save! http://p.sf.net/sfu/rim-blackberry-1 _______________________________________________ Re2c-general mailing list Re2c-general@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/re2c-general