Alan Manuel Gloria:
> I think a different approach is better.

Definitely a possibility; I'm still trying to figure out if it's possible to do 
this in a simpler/cleaner way.

BTW, I'm realizing that this creates yet another potential problem: Disabled 
error-checking.
With this, a line with indentation that doesn't match its parents might be okay 
(!).
We may be able to quickly detect that and deal with it; I'd like to make sure we
can still quickly detect bad indents.


>  The problem is that DEDENT_PARTIAL cannot give information about
> *how many* ? exist on the indent stack.

But how much of that information do we really need?


> Instead, I think this calls for a more complicated indentation preprocessor:

(pft)... That's the sound of my head exploding :-).

I've read that several times and I don't think I fully understand it.
I understand each line separately, but not why you believe they
work properly together.  I'm imagining trying to create a math proof that
this algorithm is correct... and failing completely.

Also, I can't begin to imagine *explaining* that algorithm to someone.
While the BNF has many lines, many people have had lots of training in
BNFs and can pick them up quickly.  Indentation processing like this... not so 
much.

Granted, you could argue that's a limitation on MY end, and that's probably
true enough.  But if I have trouble understanding it, I doubt I'm the only one.


> Basically, the formulation would remove all mention of GROUP_SPLIT and
> SUBLIST (and all branches where they occur) but complicate the
> indentation preprocessor.

That's a significant part of the definition of these expressions,
rendering them basically invisible to automated checking and analysis.
I want this notation to work "because it's clearly correct"; using ANTLR
to check it rigorously is a valuable way to get there.  That's a dangerous loss.

Is there a way to simplify this, perhaps by finding some half-way approach?

I plan to do some experimenting with the ANTLR BNF, and see if there's a way
to tweak what we have while keeping the automated analysis working.
Suggestions welcome.

--- David A. Wheeler

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
Readable-discuss mailing list
Readable-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/readable-discuss

Reply via email to