Re: slight oddity in script parser

2008-08-01 Thread Marco Gerards
Hi, Bean <[EMAIL PROTECTED]> writes: > On Fri, Aug 1, 2008 at 6:32 PM, Marco Gerards <[EMAIL PROTECTED]> wrote: >> Hi, >> >> Bean <[EMAIL PROTECTED]> writes: >> >>> Perhaps we should use automatic tool to generate the lexer, like using >>> bison for the parser. But I recall that Marco encounter s

Re: slight oddity in script parser

2008-08-01 Thread Patrick Georgi
Robert Millan schrieb: If it's just to support \ in comments, I think it's not worth the hassle to implement and later debug any problems it creates. There's also the "comments that don't start at the beginning of the line" thing, and it might be that one of the issues in my other mail (leading

Re: slight oddity in script parser

2008-08-01 Thread Robert Millan
On Fri, Aug 01, 2008 at 12:34:20PM +0800, Bean wrote: > > Hi, > > In theory, it should be handled by the lexer. but actually, it's not > so easy. lexer already has some issue, adding new handling would not > help. I'm not familiar with this part of GRUB. But based on what you say, I think befor

Re: slight oddity in script parser

2008-08-01 Thread Bean
On Fri, Aug 1, 2008 at 6:32 PM, Marco Gerards <[EMAIL PROTECTED]> wrote: > Hi, > > Bean <[EMAIL PROTECTED]> writes: > >> Perhaps we should use automatic tool to generate the lexer, like using >> bison for the parser. But I recall that Marco encounter some issue >> with flex, but I can't remember wh

Re: slight oddity in script parser

2008-08-01 Thread Marco Gerards
Hi, Bean <[EMAIL PROTECTED]> writes: > Perhaps we should use automatic tool to generate the lexer, like using > bison for the parser. But I recall that Marco encounter some issue > with flex, but I can't remember what it's now. You are right. I am not happy with the current lexer and would pref

Re: slight oddity in script parser

2008-07-31 Thread Bean
On Fri, Aug 1, 2008 at 12:42 PM, Stefan Reinauer <[EMAIL PROTECTED]> wrote: > Bean wrote: >> On Fri, Aug 1, 2008 at 12:26 PM, Stefan Reinauer <[EMAIL PROTECTED]> wrote: >> >>> Bean wrote: >>> On Fri, Aug 1, 2008 at 7:48 AM, Patrick Georgi <[EMAIL PROTECTED]> wrote: > Hi, > >>

Re: slight oddity in script parser

2008-07-31 Thread Stefan Reinauer
Bean wrote: > On Fri, Aug 1, 2008 at 12:26 PM, Stefan Reinauer <[EMAIL PROTECTED]> wrote: > >> Bean wrote: >> >>> On Fri, Aug 1, 2008 at 7:48 AM, Patrick Georgi <[EMAIL PROTECTED]> wrote: >>> >>> Hi, I forgot this, so sorry for the separate mail: Currently, the pa

Re: slight oddity in script parser

2008-07-31 Thread Bean
On Fri, Aug 1, 2008 at 12:26 PM, Stefan Reinauer <[EMAIL PROTECTED]> wrote: > Bean wrote: >> On Fri, Aug 1, 2008 at 7:48 AM, Patrick Georgi <[EMAIL PROTECTED]> wrote: >> >>> Hi, >>> >>> I forgot this, so sorry for the separate mail: >>> Currently, the parser expects comments to start at the beginni

Re: slight oddity in script parser

2008-07-31 Thread Stefan Reinauer
Bean wrote: > On Fri, Aug 1, 2008 at 7:48 AM, Patrick Georgi <[EMAIL PROTECTED]> wrote: > >> Hi, >> >> I forgot this, so sorry for the separate mail: >> Currently, the parser expects comments to start at the beginning of the >> line, so "ls /foo # necessary because of baz" doesn't work properly

Re: slight oddity in script parser

2008-07-31 Thread Bean
On Fri, Aug 1, 2008 at 7:48 AM, Patrick Georgi <[EMAIL PROTECTED]> wrote: > Hi, > > I forgot this, so sorry for the separate mail: > Currently, the parser expects comments to start at the beginning of the > line, so "ls /foo # necessary because of baz" doesn't work properly > > I think a good scena

slight oddity in script parser

2008-07-31 Thread Patrick Georgi
Hi, I forgot this, so sorry for the separate mail: Currently, the parser expects comments to start at the beginning of the line, so "ls /foo # necessary because of baz" doesn't work properly I think a good scenario would be to have comments start either on "#" at pos0, or on " #". This way, l