Re: Parser generator (+ Lexer) that actually works?
- From: "tom.rmadilo" <tom.rmadilo@xxxxxxxxx>
- Date: Sun, 6 Jun 2010 09:14:56 -0700 (PDT)
On Jun 6, 2:01 am, Uwe Klein <uwe_klein_habertw...@xxxxxxxxxxx> wrote:
tom.rmadilo wrote:
On Jun 5, 11:28 am, "Gerald W. Lester" <Gerald.Les...@KnG-
Consulting.net> wrote:
Fredrik Karlsson wrote:
Hi,
I've been trying to get hold of a parser generator + lexer combination
that would give me a parser implemented in Tcl, that actually works.
My experience so far:
taccle + fickle - just outputs nothing. Even the demos fails to give
any ouput.
Yeti - I get bus error every time I use either the parser or the lexer
demos.
I am using UTF-8 encoding.. Are there other options out there that I
should try before continuing my current work of rolling my own parser
from scratch?
If you have control over the input language, how about using a safe interp
and letting the Tcl parser parse it for you.
I don't understand, if the Tcl parser can parse the language, wouldn't
it be Tcl?
Sure.
Then you really aren't talking about a new language to parse.
But even so, since the Tcl parser doesn't enforce command
structure, how does this end up working? There must be a simple
example of this concept, which would be very helpful if you don't
really need a flex/bison type generator.
The basic idea about tcl:
Being a framework for most "domain specific language" instances
you could need,
Maybe there is some confusion about how tools like flex/bison or Yeti
are used and why. At best the Tcl parser is a tokenizer like flex.
Each command basically serves as its own parser. If the language has
any recursion, it would be, my guess, a very ugly language to
represent as Tcl code.
Or maybe not, but a specific example would clear things up...and help
others avoid the extra work of using a flex/bison type generator.
.
- Follow-Ups:
- Re: Parser generator (+ Lexer) that actually works?
- From: Uwe Klein
- Re: Parser generator (+ Lexer) that actually works?
- References:
- Parser generator (+ Lexer) that actually works?
- From: Fredrik Karlsson
- Re: Parser generator (+ Lexer) that actually works?
- From: Gerald W. Lester
- Re: Parser generator (+ Lexer) that actually works?
- From: tom.rmadilo
- Re: Parser generator (+ Lexer) that actually works?
- From: Uwe Klein
- Parser generator (+ Lexer) that actually works?
- Prev by Date: Re: Parser generator (+ Lexer) that actually works?
- Next by Date: Re: Parser generator (+ Lexer) that actually works?
- Previous by thread: Re: Parser generator (+ Lexer) that actually works?
- Next by thread: Re: Parser generator (+ Lexer) that actually works?
- Index(es):
Relevant Pages
|