From tluthe at physik.uni-bielefeld.de Thu Apr 27 14:56:14 2017 From: tluthe at physik.uni-bielefeld.de (Thomas Luthe) Date: Thu, 27 Apr 2017 14:56:14 +0200 Subject: [CLN-list] Integer parser Message-ID: <760e24fe-8769-9960-3c57-e32408218318@physik.uni-bielefeld.de> Hi, I am writing my own parser for expressions and want to use cln for parsing integers within these expressions, specifically using read_integer (const cl_read_flags& flags, const char * string, const char * string_limit, const char * * end_of_parse) . Unfortunately this fails with a cln::read_number_bad_syntax_exception if the integer immediately precedes a "/" (example attached). I have traced the cause back to line 119 in cl_I_read.cc. My suspicion is that the check for "/" originates from the rational case (as the file states that the code is a condensed version of read_rational()) and could simply be removed, but I am not familiar enough with the code to be certain this would not break other use cases. Even though I can work around this by to determining the end of the integer before the call and setting string_limit accordingly, I would appreciate a fix for this issue. Cheers, Thomas Luthe -------------- next part -------------- A non-text attachment was scrubbed... Name: parse.cpp Type: text/x-c++src Size: 339 bytes Desc: not available URL: