On Thu, Jun 4, 2015 at 8:13 PM, 'Pascal Jasmin' via Programming < [email protected]> wrote:
> The main use case for nested multiline expressions is documents such as > html where each multiline group has its own parser. So the style tag > includes highly structured easily parsable info, that is different from > most tags. A 3rd group could contain J expressions that are templated into > the body. > > [snip] > or as described for the main use case: > > htmltext =: htmlwrapper (styleparser 0 : 0) , bodypareser 0 : 0 > bodytext > ) NB. formatted style tag (tab separated) Name prop value > styleinput > ) > > > Can you elaborate on this use case? Are you using codegen to write this code or are you hand writing it? I'd like to understand it more to see if there's an alternate, more readable and equally flexible way to accomplish it > ----- Original Message ----- > From: bill lam <[email protected]> > To: Programming forum <[email protected]> > Cc: > Sent: Thursday, June 4, 2015 7:11 PM > Subject: Re: [Jprogramming] would changing multiline parsing of ) and : be > good ideas? > > IMO nested explicit definition such as the following would be more readable > > v =. 4 : 0 > u =. 3 : 0 > +: y > ) > x+u y > ) > 2 v 3 > 8 > On Jun 5, 2015 1:42 AM, "'Pascal Jasmin' via Programming" < > [email protected]> wrote: > > > its possible to define nested multiple line expressions such as: > > > > v =. (4 : 0) (3 : 0) > > +: y > > ) > > x+y > > ) > > 2 v 3 > > 8 > > > > A problem is that you cannot place even a comment on the same line as a > > closing ')' > > > > It would seem to be a simple modification to the parser to check for the > > first character of a line to be ')' or ':', and the parser already takes > > out any trailing blanks, so a simple useful change might be to strip out > > trailing comments (first) and (then) blanks. > > > > This would have the added benefit of including documentation that is not > > inserted into the function, which commenting what part of an expression > ')' > > is closing should not be anyway. > > > > Any arguments against this change? > > ---------------------------------------------------------------------- > > For information about J forums see http://www.jsoftware.com/forums.htm > > > > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
