Re: Newbie code review of parsing program Please

2008-11-17 Thread len
Thanks Paul I will be going over your code today. I started looking at Pyparsing last night and it just got to late and my brain started to fog over. I would really like to thank you for taking the time to provide me with the code sample I'm sure it will really help. Again thank you very much.

Re: Newbie code review of parsing program Please

2008-11-17 Thread len
On Nov 16, 9:57 pm, Lawrence D'Oliveiro <[EMAIL PROTECTED] central.gen.new_zealand> wrote: > len wrote: > >     if fieldline.count('COMP.') > 0: > > I take it you're only handling a particular subset of COBOL constructs: thus, > "COMP" is never "COMPUTATIONAL" or "USAGE IS COMPUTATIONAL", and it a

Re: Newbie code review of parsing program Please

2008-11-17 Thread Paul McGuire
On Nov 16, 12:53 pm, len <[EMAIL PROTECTED]> wrote: > On Nov 16, 12:40 pm, "Mark Tolonen" <[EMAIL PROTECTED]> wrote: > > > > You might want to check out the pyparsing library. > > > -Mark > > Thanks Mark I will check in out right now. > > Len Len - Here is a rough pyparsing starter for your probl

Re: Newbie code review of parsing program Please

2008-11-17 Thread John Machin
On Nov 17, 7:11 pm, Lawrence D'Oliveiro <[EMAIL PROTECTED] central.gen.new_zealand> wrote: > Mark Tolonen wrote: > > Point taken...or I could top post ;^) > > A: A Rolls seats six. > Q: What's the saddest thing about seeing a Rolls with five top-posters in it > going over a cliff? +1 but you forg

Re: Newbie code review of parsing program Please

2008-11-17 Thread Lawrence D'Oliveiro
Mark Tolonen wrote: > Point taken...or I could top post ;^) A: A Rolls seats six. Q: What's the saddest thing about seeing a Rolls with five top-posters in it going over a cliff? -- http://mail.python.org/mailman/listinfo/python-list

Re: Newbie code review of parsing program Please

2008-11-17 Thread Mark Tolonen
"Steve Holden" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] Mark Tolonen wrote: "len" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] [...] You might want to check out the pyparsing library. And you might want to trim your messages to avoid quoting irrelevant s

Re: Newbie code review of parsing program Please

2008-11-16 Thread Lawrence D'Oliveiro
len wrote: > if fieldline.count('COMP.') > 0: I take it you're only handling a particular subset of COBOL constructs: thus, "COMP" is never "COMPUTATIONAL" or "USAGE IS COMPUTATIONAL", and it always occurs just before the full-stop (can't remember enough COBOL syntax to be sure if anythin

Re: Newbie code review of parsing program Please

2008-11-16 Thread Steve Holden
Mark Tolonen wrote: > > "len" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] [...] > > You might want to check out the pyparsing library. > And you might want to trim your messages to avoid quoting irrelevant stuff. This is not directed personally at Mark, but at all readers. Loa

Re: Newbie code review of parsing program Please

2008-11-16 Thread len
On Nov 16, 12:40 pm, "Mark Tolonen" <[EMAIL PROTECTED]> wrote: > "len" <[EMAIL PROTECTED]> wrote in message > > news:[EMAIL PROTECTED] > > > > > > >I have created the following program to read a text file which happens > > to be a cobol filed definition.  The program then outputs to a file > > what

Re: Newbie code review of parsing program Please

2008-11-16 Thread Mark Tolonen
"len" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] I have created the following program to read a text file which happens to be a cobol filed definition. The program then outputs to a file what is essentially a file which is a list definition which I can later copy and past into

Newbie code review of parsing program Please

2008-11-16 Thread len
I have created the following program to read a text file which happens to be a cobol filed definition. The program then outputs to a file what is essentially a file which is a list definition which I can later copy and past into a python program. I will eventually expand the program to also outpu