Alan Manuel Gloria:
> Instead, I think this calls for a more complicated indentation preprocessor:
> 1.  If you encounter a SUBLIST, emit an INDENT (or EOL-INDENT since
> that seems to be your preferred formulation) and push ? on the indent 
> stack....

This algorithm pushes indents for SUBLIST even if SUBLIST is *not* at the end.
That's flexible, but rather complicated.

I think we can simplify this "weird indentation" processing greatly by only
accepting these odd dedents when "$" is at the end, to close that ending "$".
That's the only use case I've seen. Thoughts?  Too limiting?

If we do that (see my BNF example), it not only makes things simpler...
I believe it completely eliminates any ambiguity of matching the "$" to the
correct "partial dedent" (as I'm calling it).

I'm trying to look at this idea from various angles.
I want whatever grammar is finalized to be as correct as we can make it, and
I see ANTLR's grammar-checking mechanisms as a key tool to help do that.
I am very loathe to give that up.

--- David A. Wheeler

Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
Readable-discuss mailing list

Reply via email to