I'm not sure which approach I'd take, if I were doing this. Marpa would
scale welll, but this is an application for which *inaccuracy* is a
feature. That is, you want scripts to be detected as Perl even if there
is a syntax error somewhere. Marpa can handle this as well, but
approaches which are inherently inaccurate have an advantage here. :-)
-- jeffrey
On 05/14/2014 08:14 AM, Helmut Wollmersdorfer wrote:
Am Donnerstag, 8. Mai 2014 21:16:46 UTC+2 schrieb Jeffrey Kegler:
Steven Haryanto poses a problem in this blog post
<http://blogs.perl.org/users/steven_haryanto/2014/04/detecting-jsonyamlperlcsvtsvltsv.html>
of disambiguating JSON/YAML/Perl/CSV/TSV/LTSV.
Maybe you read my answer to his post.
I see three approaches for his problem:
1) brute force trying all parsers ambiguosly (your suggestion)
2) feature detection, as I sketched in the blog (advantage: get scores
for approximate matches, even if the string isn't valid syntax)
3) ASF parsing, i.e. bottom up matching, pruning away the worst
matching alternatives
--
You received this message because you are subscribed to the Google
Groups "marpa parser" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to [email protected]
<mailto:[email protected]>.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "marpa
parser" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.