[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: flex bison
From: |
David Durham |
Subject: |
Re: flex bison |
Date: |
Mon, 01 Oct 2001 09:41:34 -0500 |
- I would suggest reading the manuals for flex and bison for a REAL
understanding of how things should work... I don't mean to give you the
run around... I just want to encourage you to do the best thing for
yourself. I did it, and don't regret spending those 3 or 4 hours in the
manuals doing the examples and now being quite proficient in flex and
bison as I'm sure any decent programmer could also do.
http://www.gnu.org/manual/manual.html
- Also, the example input could really be parsed with flex alone...
Basically, because there is no nestability (with infinite depth) in your
input format. This is a general rule for regular expressions (flex
parses these) verses a context free grammer (bison parses these, but it
is generally used in tandem with flex to do the work)
- However, unless this input format is going to get more complicated, it
would be much more efficient and easy for you to use the strtok function
in the C library. Read the man page for strtok completely first as it
has a perhaps unexpected but necessary behavior... (or use strtok_r to
avoid this behavior)
-- Davy
On Mon, 2001-10-01 at 07:25, zze-Anticipip Ball001 FTRD wrote:
>
> i have a file to parse which looks like :
>
> name|ipadress|date|val
> tintin|12.36.56.3|12/01|16
> milou|12.36.56.4|15/01|15
>
> and i don't knwo how to write the .l and the .y
>
> can some one help me ??
>
>
>
> _______________________________________________
> Help-bison mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/help-bison
- flex bison, zze-Anticipip Ball001 FTRD, 2001/10/01
- Re: flex bison,
David Durham <=