Hi Felix,
On Mon, Jan 18, 2010 at 02:19:45PM +0100, Felix Hartmann wrote:
> Actually I found two ways how to make it work. Sometimes the mkgmap
> style-file code allows so many nice workarounds. :-)
>
> *a)* the odd way
> rcn_ref=* & rcn_ref=10 { name '${rcn_ref}' } [0x01701 resolution 22
> continue]
> rcn_ref=10 { name '${rcn_ref}' } [0x01800
> resolution 22]
>
> *b)* the logic way (which can be used for even more than 2 symbols) -
Why couldn't the odd way be used for several symbols?
Would having multiple rcn_ref=*& at the start of the rule help?
Why do you need the rcn_ref=*& anyway? Shouldn't the continue
do the trick already?
Ultimately, I would like to see something like this:
(rcn_ref % 100 / 100) = 1 [symbol for '1__' continue]
(rcn_ref % 10 / 10) = 1 [ symbol for '_1_' continue]
(rcn_ref % 10) = 1 [ symbol for '__1' ]
You might need to prefix these rules with rcn_ref=*.
Removing leading zeros would take some further conditions, something
like this:
rcn_ref > 9 & (rcn_ref % 10 / 10) = 0 [ symbol for '_0_' continue]
and (if we are to support rcn_ref > 999)
rcn_ref > 99 & (rcn_ref % 100 / 100) = 0 [ symbol for '0__' continue]
Currently, the parser does not support arithmetic operators such
as /, %, *, +, -. Integer arithmetics should be easy implement.
Marko
_______________________________________________
mkgmap-dev mailing list
[email protected]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev