-j
On Mon, Dec 28, 2015 at 12:05 AM, Jingguo Yao <yaoji...@gmail.com> wrote:
> [...]
In practice parser generates are more useful than lexer generators. A
hand-written lexer is usually fairly easy to write and generally
outperforms a generated lexer, at least with the lexer generators that
I've seen.
-j
--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
In practice parser generates are more useful than lexer generators. A
hand-written lexer is usually fairly easy to write and generally
outperforms a generated lexer, at least with the lexer generators that
I've seen.
Great reasons to port flex, and a good set of example programs too!
Op maandag 28 december 2015 19:35:51 UTC+1 schreef Ian Lance Taylor:In practice parser generates are more useful than lexer generators. A
hand-written lexer is usually fairly easy to write and generally
outperforms a generated lexer, at least with the lexer generators that
I've seen.I have never had the need for a tool like yacc, but I have used flex quite a lot. I would really like a port from flex to Go.
-j
Damian
On Sat, Jan 2, 2016, 16:58 Peter Kleiweg <pkle...@xs4all.nl> wrote:Op maandag 28 december 2015 19:35:51 UTC+1 schreef Ian Lance Taylor:In practice parser generates are more useful than lexer generators. A
hand-written lexer is usually fairly easy to write and generally
outperforms a generated lexer, at least with the lexer generators that
I've seen.I have never had the need for a tool like yacc, but I have used flex quite a lot. I would really like a port from flex to Go.Please let me know which features of flex do you miss in golex.
I've had success using http://www.colm.net/open-source/ragel/ to generate lexers, and you can use them with yacc.
Rules with the longest match should be selected.
Flex uses look-up tables for speed.
Does it support commands like BEGIN, REJECT, yymore(), yyless()? I haven't tested this.
I tried converting a simple lexer from flex to golex, using the example as a guide. It is a very simple thing, no BEGIN or REJECT, but I can't get it to work as it should. Sometimes I get the wrong output, sometimes I get a scanner error.
-j
-j
-j
-j