nex
nex copied to clipboard
Lexer for Go
So I was trying to migrate a BISON/FLEX basic parser written in "C" to GO. Settled on goyacc and nex. But was seeing bizarre behavior, where lines were not being...
Partial implementation of discussion in #38 This works just fine for NN_FUN style lex; but it would need significantly more work to support `writeLex` correctly. I don't understand the internals...
I haven't done super serious profiling yet, but in a rather large application we run, our lexer keeps coming up in goroutine dumps at what seems to be a disproportionately...
flex project has been moved to github: http://flex.sourceforge.net/
I was having trouble using nex with go yacc so I copied the example to test it out. I compiled, but it didn't work, as soon as I enter some...
Quite hilariously, an unpaired curly brace inside nex golang code causes lex/parse errors with nex itself! Example: ``` /\$[a-z][a-z0-9]*{[0-9]+}/ { yylex.pos(lval) // our pos s := yylex.Text() a := strings.Split(s,...
### Description In the source there is `func (yylex *Lexer) Line() int` `func (yylex *Lexer) Column() int`. I think it would also be useful to have `func (yylex *Lexer) Size()...
Are multiline comments possible with nex? I've been playing with nex quite a bit and I'm very impressed. However, I'm having trouble figuring out how to handle multiline comments. Can...
I'm having a hard time understanding the behavior of the lexer in the following case: ``` /\(/ { fmt.Printf("-> %q\n", yylex.Text()) } /\)/ { fmt.Printf("-> %q\n", yylex.Text()) } /[^( ][^...