There is a goyacc (many thanks for that!), but there isn't a golex cmd. Are
there any plans to develop a golex?
I've looked around for other lexers (and grammars) in the standard package
tree and there is:
* ebnf - only lets you make and verify grammars. Getting to the
actual data parsed with the grammar is not implemented.
* scanner - could not get it to recognize words containing / or other
characters that have significance for Go
So I ended up creating my own lexer.
Kind regards,
--
Miek
I prefer using ragel for writing lexers, and in SVN version there is a
support for the Go programming language.
http://www.complang.org/ragel/
It's a very flexible state machine code generator, but maybe a bit
hard to use.. although it's well documented.
Other people prefer writing lexers by hand.
Didn't know about that one. Thanks for the pointer!
grtz,
--
Miek
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
iEYEARECAAYFAk01pOMACgkQJYuFzziA0PY59wCg2o5b/osYBVprcNsWaOCRkcAd
o/wAn2pQV1ApGDhUBMK9fVTjKN86YWA2
=jDC2
-----END PGP SIGNATURE-----
Hmm, that is another idea... but the DNS package is getting pretty big
already. I want to avoid adding a lexer to the mix.
grtz Miek
Russ
Apparently there is a need and the stuff in the standard Go packages
obviously isn't sufficient.
I'm very much in favor of adding a lexer, in addition to yacc, to the
standard lib of Go.
grtz Miek