Bugs item #1885856, was opened at 2008-02-03 20:33 Message generated for change (Settings changed) made by helly You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=616200&aid=1885856&group_id=96864
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None >Status: Closed Resolution: Later Priority: 5 Private: No Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: code generation error Initial Comment: consider the following example /*!re2c [0-9a-zA-Z+.\-]* ":" { schema given; } [0-9a-zA-Z+.\-]* [^:\000?;#] [^\000?;#]* { netloc; } [0-9a-zA-Z+.\-]* { path given; } */ The algorithm takes an URL. http://www.sf.net/ The generated code chooses the case 2) although it should select the case 1) The generated code doesnt have such an error in case the regexp admitting schema symbols is omitted. /*!re2c ":" { schema given; } [^:\000?;#] [^\000?;#]* { netloc; } [\000?;#]* { ; } */ ---------------------------------------------------------------------- Comment By: Marcus Börger (helly) Date: 2008-02-03 22:37 Message: Logged In: YES user_id=271023 Originator: NO Actually you have no else case here. As the documentation explains, re2c will not generate and else or default state for you. Instead you have to do so yourself. However re2c does not really allow this kind of constructs. That is a beginning snippet that basically gets skipped and is a common prefix to a bunch of states. Maybe re2c could get a detection for this kind of stuff. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=616200&aid=1885856&group_id=96864 ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Re2c-general mailing list Re2c-general@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/re2c-general