grub-devel
[Top][All Lists]
Advanced

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

Re: slight oddity in script parser


From: Bean
Subject: Re: slight oddity in script parser
Date: Fri, 1 Aug 2008 12:47:22 +0800

On Fri, Aug 1, 2008 at 12:42 PM, Stefan Reinauer <address@hidden> wrote:
> Bean wrote:
>> On Fri, Aug 1, 2008 at 12:26 PM, Stefan Reinauer <address@hidden> wrote:
>>
>>> Bean wrote:
>>>
>>>> On Fri, Aug 1, 2008 at 7:48 AM, Patrick Georgi <address@hidden> 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 scenario would be to have comments start either on "#" at
>>>>> pos0, or on " #". This way, ls /foo#bar continues to work.
>>>>>
>>>>> Also, currently the following is a single comment, which is an unusual
>>>>> feature:
>>>>> # this comment starts here\
>>>>> and continues on this line
>>>>>
>>>>>
>>>> Hi,
>>>>
>>>> Actually, # and \ is handled in the read line function, it can't
>>>> handle complicated situation.
>>>>
>>>>
>>> Are you implying it is wrong there and should be moved to the parser?
>>>
>>
>> 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.
>>
>>
> So, what's the right way to fix it, then?

Hi,

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.

-- 
Bean




reply via email to

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