[pdal] RE: Gist notes

Mateusz Łoskot mateusz at loskot.net
Sat Dec 10 18:10:52 EST 2011


2011/12/10 Michael P. Gerlek <mpg at flaxen.com>:
> You had seemed to be originally saying that a proper DSL didn't need annotations for guids,
>but you are using {}'s here, so I'm not sure what you're original post meant now.

Yes, I suggested it is possible, but without knowing what is the
actual grammar of PDAL expressions.
GUID in hex-based textual format has data parts separated by '-' which
may be ambiguous
or it may not. For example, it depends if grammar is white-space
sensitive, where are GUIDs acceptable.

For example:

If white spaces are mandatory, it is possible to parse this without
any problems:

Field1 = 3F2504E0-4F89-11D3-9A0C-0305E82C3301 + 10

but in this case it is very difficult if not impossible to avoid ambiguities:

Field1=3F2504E0-4F89-11D3-9A0C-0305E82C3301+9F740E48-F56E-4105-900E-93B8E6E5ADCC-Field2*10-123

That's why {} delimiters solve the problem. For parser grammar, it is
a very simple addition.

IMHO, Boost.Spirit, ANTLR or any other good parser parser is always
superior than hand-written processors.

Best regards,
-- 
Mateusz Loskot, http://mateusz.loskot.net
Charter Member of OSGeo, http://osgeo.org
Member of ACCU, http://accu.org


More information about the pdal mailing list