help-bison
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: sdp parser


From: Hans Aberg
Subject: Re: sdp parser
Date: Sat, 16 Feb 2002 13:20:49 +0100

At 05:43 -0500 2002/02/16, babar haq wrote:
>people i am a beginner at compilers
>i have to write a parser for sdp (session description protocol. i have the
>bnf from an rfc of sdp but i dont know how to convert it to bison/flex
>syntax.plz if someone can send me a tutorial or guide me in anyway

For Flex questions, use:
  Help-flex mailing list
  address@hidden
  http://mail.gnu.org/mailman/listinfo/help-flex

For non-Bison specific questions, you may also try the comp.compilers
Usenet newsgroup.

Flex and Bison comes with manuals which should contain all info you need in
order to get started. Work through those examples there, to get something
working and an understanding of how it works.

Akim Demaille <address@hidden> posted in this list, subject "Re: y.output
format", 2002/01/10, a manuscript which may contain additional info useful
to you.

If a context free grammar looks like
    a -> b1 ... bm
    a -> c1 ... cn
    ...
or in BNF
    a ::= b1 ... bm | c1 ... cn
    ...
the grammar in Bison would look like
    a:
       b1 ... bm { action 1 }
     | c1 ... cn { action 2 }
where the {...} things are (optional) actions. (If you don't write out the
actions, Bison will substitute a default, which can be practical when you
are just working with the grammar.)

-- Replies, please keep the cc to Help Bison.

  Hans Aberg





reply via email to

[Prev in Thread] Current Thread [Next in Thread]