Re: parser using perl



true, I have the grammar in the form of BNF. But I am not interested
in converting
the BNF to parser rules, when I know that these productions are not
useful to me.
I am planning to write 8-10 rules and rules for pertaining tokens
only. Of course,
I might have to write additional rules to catch comments etc.

Regards,

On Mon, Mar 31, 2008 at 8:30 PM, Chas. Owens <chas.owens@xxxxxxxxx> wrote:
On Mon, Mar 31, 2008 at 10:51 AM, Sharan Basappa

<sharan.basappa@xxxxxxxxx> wrote:

I am not a compler expert, but if I all I am interested in few
> productions out of
> many productions, I can setup by scanner to generate tokens pertaining to
> interesting productions and ignore the rest. As I said, I am not a
> compiler expert.
> So, I could be understating the problem ..
>
> I will have a look at the parser library. Thanks ...
>
> Regards
snip

That assumes you have a grammar already, in which case generating a
full parser is easy. The problem comes from incomplete grammars.

--


Chas. Owens
wonkden.net
The most important skill a programmer can have is the ability to read.

.



Relevant Pages

  • Re: Would this qualify as a "recursive descent parser"?
    ... The underlined expression is an application of the second rule, ... the parser I wrote is quite capable of handling recursive ... rulesets that define recursive grammars, ... They find tiny patterns that match productions in the ...
    (comp.programming)
  • Re: syntax/notation used in describing cs grammar
    ... from one of those productions, ... nonterminal and R is a string of terminals and nonterminals. ... > the grammar of the grammar as it were. ... > is possible and easier to do a semi-parser than a full parser, ...
    (comp.lang.c)
  • Re: (BNF) EBNF to BNF-grammar
    ... AFAIK the term EBNF is used for various extensions to BNF. ... Such a translation most probably will require more than only a grammar ... or parser, due to the required translation into another text file. ...
    (comp.compilers)
  • Re: Is pyparsing really a recursive descent parser?
    ... There are an enormous variety of parsing tools, ... For instance, the Earley parser ... Okay, in some contexts, an ambiguous grammar may be considered ... over the other through the context of the parse results? ...
    (comp.lang.python)
  • Re: ANTLR Target for Ruby
    ... is to figure out where backtracking might be needed and do it efficiently ... a large overhead over using a hand-crafted parser. ... If you also provided a sweet metagrammar (I find your earlier Grammar ... The real work is in the "engine" that does parser ...
    (comp.lang.ruby)