[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cgiapp] [OT] Which Parser is "best"


> LAYER NAME bgl21
>   METADATA
>     LTITLE "Grünflächen"
>   END
>   DATA "/data/muc/shapes_ms/gruen"
>   CLASSITEM "code"
>   CLASS NAME ""
>     SYMBOL 0
>     COLOR 166 255 165
>     OUTLINECOLOR 195 255 195
>   END # class
>   TYPE polygon
> END # layer bgl21
>
> The newlines are not obligatory, it could be a long string; comments
> are denoted by #. Objects like LAYER or CLASS are always ended by END.
> The files are case insensitive.
>
> My only approach with parsing files like this is with regexps, but
> maybe this is not the best way as those mapfiles can be several hundred
> lines long.
>
> Therefore I am looking for helpful advice.

Check out D.Conway's Parse::RecDescent and Text::Balanced

HTH, Hans

---------------------------------------------------------------------
Web Archive:  http://www.mail-archive.com/suppressed/
To unsubscribe, e-mail: suppressed
For additional commands, e-mail: suppressed


Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.