<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>Hi Bernd,<br><br>the problem is caused by the empty lines in your style file and a <br>routine which tries to detect all kinds of line feed and carriage return combinations<br>(0x0a, 0x0d) as "end of line".<br>As a result, empty lines are not counted.<br><br> @Steve: I know that this part in TokenScanner is critical, so I don't dare to change it:<br> if (c == '\n' || c == '\r') {<br> while ((c = readChar()) == '\n' || c == '\r')<br> val.append(c);<br>..<br>}<br><br>Gerd<br><br><br><div>> From: weigelt.bernd@web.de<br>> To: mkgmap-dev@lists.mkgmap.org.uk<br>> Date: Fri, 21 Mar 2014 20:11:14 +0100<br>> Subject: [mkgmap-dev] mkgmap --check-styles and line count<br>> <br>> Hi<br>> <br>> my style include a lot of rules like this:<br>> <br>> highway=footway [0x1200d resolution 23-23 continue]<br>> highway=footway [0x1100d resolution 24 continue]<br>> highway=footway & <br>> (bicycle=designated | <br>> bicycle=permissive | <br>> bicycle=official |<br>> bicycle=yes) [0x0a resolution 24 road_class=0 road_speed=1]<br>> highway=footway [0x0d resolution 24 road_class=0 road_speed=0]<br>> <br>> IMHO mkgmap count four lines, is that correct?<br>> <br>> <br>> now it is difficult to find the error, if the files includes up to 700 lines, i <br>> think, there are some larger styles around the world<br>> mkgmap tells:<br>> Error in style: Error: (lines:393): Stack size is 0<br>> but the line with the error is line 485 in the style file<br>> <br>> my error was to use '[' instead '(' ;-)<br>> <br>> <br>> <br>> Bernd<br>> <br>> <br>> <br>> _______________________________________________<br>> mkgmap-dev mailing list<br>> mkgmap-dev@lists.mkgmap.org.uk<br>> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev<br></div>                                            </div></body>
</html>