lex question - Unix

This is a discussion on lex question - Unix ; This question doesn't have any thing to do with linux... I am writing a parser with lex. I have some problems: In the definition section I define a whole bunch of stuff and I also used them to define other ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: lex question

  1. lex question

    This question doesn't have any thing to do with linux...

    I am writing a parser with lex. I have some problems:
    In the definition section I define a whole bunch of stuff and I also
    used them to define other things.
    So I have:

    X [something]

    and I want Y to be anything but X so when I define it like:

    Y [^{X}] it only exclude the characters '{' , '}' ,and X

    I can't find a way to exclude the definitions and use them in
    other definitions. Any idea how to do it?


    Also I'm trying to set rules for Octant, but lex doesn't let me logical OR them
    together. and I can't do ranging either ([\001-\006]), in case I'm not clear:
    So it doesn't let me do:

    ACK_BELL \006 | \007

    any Idea how to parse text with Octants?

    Also can all the control characters (000-037 and 127 in octant) apear in a text file?

    Thanks,

    ~Mina

    --

    -Mina Doroudi (dormina@cc.gatech.edu)

  2. Re: lex question

    In article , Mina Doroudi
    wrote:

    > This question doesn't have any thing to do with linux...
    >
    > I am writing a parser with lex. I have some problems:


    If you could check out Flex, which has Lex compatibiliy, and its manual:
    http://flex.sourceforge.net/
    http://lex.sourceforge.net/
    help-flex@gnu.org
    and the Usenet newsgroup comp.compilers and its FAQ, posted there monthly,
    as well. Switch to Flex first, though, before asking quesions on that
    mailing list.

    --
    Hans Aberg

+ Reply to Thread