lua-users home
lua-l archive

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


Luiz Henrique de Figueiredo <lhf@tecgraf.puc-rio.br> writes:
>> Couldn't Lua's lexer, while reading a "-delimited string, just
>> squash an embedded "<ws>..<ws>" sequence without the parser ever
>> even knowing about it (where <ws> means [ \t\n])...?
>
> It could but it gets messy because you're actually parsing a micro language:
> you'd need to call get_token within get_token; not pretty.

Sure, but the ability to easily just punt makes it a _lot_ more tractable
-- you don't really need to handle the general case, just enough to make
the feature useful (with appropriate documentation of the limits one
needs to respect).

-Miles

-- 
Yossarian was moved very deeply by the absolute simplicity of
this clause of Catch-22 and let out a respectful whistle.
"That's some catch, that Catch-22," he observed.
"It's the best there is," Doc Daneeka agreed.