help with EBNF grammar

"Paul Meaney" <>
28 Mar 2001 08:44:07 -0500

          From comp.compilers

Related articles
help with EBNF grammar (Paul Meaney) (2001-03-28)
Re: help with EBNF grammar (William S. Lear) (2001-03-31)
Re: help with EBNF grammar (Ralph Boland) (2001-03-31)
Re: help with EBNF grammar (Mahesha N) (2001-03-31)
Re: help with EBNF grammar (Raymond Limpus) (2001-03-31)
Re: help with EBNF grammar (Mike Dimmick) (2001-03-31)
Re: help with EBNF grammar (Barry Watson) (2001-04-04)
[1 later articles]
| List of all articles for this month |

From: "Paul Meaney" <>
Newsgroups: comp.compilers,
Date: 28 Mar 2001 08:44:07 -0500
Organization: Compilers Central
Keywords: question, comment
Posted-Date: 28 Mar 2001 08:44:06 EST


        A quick introduction - my name is Paul Meaney, I am a former PhD
geneticist now turned full time Java programmer. I am working for a
company, they've given me a task and I am totally stumped. I have to
write a parser that will evaluate input expressions to boolean true/
false. I have never done anything like this before.

        In searching the web I have hit on the idea of using the JavaCC
and defining my own grammar in Extended Backus- Naur Form to turn the
input expression into a Java statement. However all the online
documentation for EBNF is for 2nd/ 3rd year computing courses and are
heavily mathematical in nature. Given my background I find it really
difficult to understand what is going on.

        Does anyone know of any resources on the web/ good books on the
subject that can teach someone who is not stupid the basics of EBNF,
parse trees and recursive- descent parsing?

Failing that would anyone have the patience to enter into a dialogue
with me so that I can ask questions? I really am at a loss here.

        Many thanks for your patience,

[You could do that, although it's overkill for such a simple problem
unless you're doing it as an exercise in learning about JavaCC. Just
about every compiler text starts with an expression calculator example,
so I'd take another look at those books. They're not all hopelessly
mathematical. -John]

Post a followup to this message

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