Re: Syntax diagram driven parser

"Brian Webb" <brian_d_webb@hotmail.com>
28 Sep 2000 22:12:30 -0400

          From comp.compilers

Related articles
Syntax diagram driven parser brian_d_webb@hotmail.com (Brian Webb) (2000-09-24)
Re: Syntax diagram driven parser joachim_d@gmx.de (Joachim Durchholz) (2000-09-24)
Re: Syntax diagram driven parser phantom@southcom.com.au (Paul Nicholls) (2000-09-24)
Re: Syntax diagram driven parser eodell@sfmedia.net (2000-09-25)
Re: Syntax diagram driven parser dancohen@canuck.com (Dan Cohen) (2000-09-25)
Re: Syntax diagram driven parser dimock@deas.harvard.edu (Allyn Dimock) (2000-09-28)
Re: Syntax diagram driven parser brian_d_webb@hotmail.com (Brian Webb) (2000-09-28)
Re: Syntax diagram driven parser brian_d_webb@hotmail.com (Brian Webb) (2000-09-28)
Re: Syntax diagram driven parser cfc@world.std.com (Chris F Clark) (2000-09-28)
Re: Syntax diagram driven parser vbdis@aol.com (2000-09-28)
Re: Syntax diagram driven parser phantom@southcom.com.au (Paul Nicholls) (2000-10-01)
Re: Syntax diagram driven parser sebmol@gmx.net (Sebastian Moleski) (2000-10-01)
Re: Syntax diagram driven parser irobot@swbell.net (Brian Webb) (2000-10-01)
Re: Syntax diagram driven parser vbdis@aol.com (2000-10-01)
[5 later articles]
| List of all articles for this month |

From: "Brian Webb" <brian_d_webb@hotmail.com>
Newsgroups: comp.compilers
Date: 28 Sep 2000 22:12:30 -0400
Organization: Compilers Central
References: 00-09-173 00-09-176
Keywords: parse, tools

On 24 Sep 2000, in comp.compilers "Joachim Durchholz" wrote:


>Hmm... I underwent a similar learning curve. I started with syntax
>diagrams, then I wanted to write a tool that generated a parser directly
>from the diagrams.
>The tool never got past the design stage. I got used to BNF so quickly
>that I didn't bother to continue work on syntax diagrams.


I might have followed this same path, but I was unaware of these
tools when I started this project.


>>Would anyone use it, even if it worked well?
>
>I wouldn't. BNF is nearer to the usual parsing tools. And I wouldn't
>want to stick to some special tool's idea of what's a syntax diagram,
>unless the tool is truly outstanding.


What if you didn't need the "usual parsing tools"? I'm essentially
using directed graphs to represent the syntax diagrams plus some
information about the keywords and other terminals. Pass this data
to a fairly simple routine along with a string, and a parse tree pops
out the other end. The syntax data would be the same regardless of
whether your application is in Basic, FORTRAN, Java, C, etc...


>>Are the current methods (BNF, LL?, LALR?) good enough?
>
>This depends on what you want to do.
>BNF is definitely good enough, at least for me. People who don't adapt
>to BNF will probably have even more difficulties diagnosing and
>correcting shift-reduce conflicts of LALR parsers.


I have no idea what a shift-reduct conflict is, but I have heard of
an LALR parser. Anyway, my ignorance didn't keep me from creating a
useful parser. Granted, there are pitfalls to using my tools, but I
have designed parsers for languages at least as complex as Pascal.


- Brian


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.