I earlier said:
> > 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.

Here's what I had in mind. Currently:

it_expr returns [Object v]
: head
...
| SUBLIST hspace* /* head SUBLIST ... case */
(sub_i=it_expr {$v=append($head.v, list($sub_i.v));}
| comment_eol indent sub_b=body {$v = append($head.v, list($sub_b.v));} )
...


Perhaps we could have the indent processor detect a partial dedent,
and have it match to the most recent line ending with "$":

it_expr returns [Object v]
: head
...
| SUBLIST hspace* /* head SUBLIST ... case */
  (sub_i=it_expr {$v=append($head.v, list($sub_i.v));}
  | comment_eol indent sub_b=body
    ( dedent_partial partial_out=body
      {$v = i_have_no_idea();}
     | empty {$v = append($head.v, list($sub_b.v));} ) )
...


The "dedent_partial" is generated by the indent processor when it sees an
indent that is strictly BETWEEN the current indent and the parent indent
(and the partial dedent then becomes the new current indent).


*IF* we can do it this way, *AND* if it's even a good idea, this would preserve
our ability to automatically analyze nearly all the grammar.


Of course, I'm still not so sure we *should* do this, but the first step is to
evaluate the pros and cons.


--- 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