Here's a list of includes from one of the inline patterns in the AsciiDoc grammar I'm writing:
{ include = '#double_bold'; }, { include = '#double_italic'; }, { include = '#double_literal'; }, { include = '#double_unquoted'; }, { include = '#double_quote'; }, { include = '#single_bold'; }, { include = '#single_italic'; }, { include = '#single_literal'; }, { include = '#single_literal_nopassthru'; }, { include = '#single_unquoted'; }, { include = '#superscript'; }, { include = '#characters'; },
But it happens that that list is almost the same as the #inline group I've already defined. I could reduce this to a single include! There's just one problem: we must not include ourselves, i.e. #subscript; we crash if we do, and anyway it's wrong (this pattern is not in any way recursive). Thus I request that the grammar should allow me to talk like this:
{ include = '#inline'; }, { exclude = '#subscript'; },
This is not just to make the list shorter; it also makes the list more correct and coherent, because I'm allowed to say (and see) exactly the truth: "include everything except yourself".
Thanks for thinking about this - m.
-- matt neuburg, phd = matt@tidbits.com, http://www.apeth.net/matt/ pantes anthropoi tou eidenai oregontai phusei Programming iOS 7! http://shop.oreilly.com/product/0636920031017.do iOS 7 Fundamentals! http://shop.oreilly.com/product/0636920032465.do RubyFrontier! http://www.apeth.com/RubyFrontierDocs/default.html TidBITS, Mac news and reviews since 1990, http://www.tidbits.com
I should add that this list is repeated over and over in slight variations throughout the grammar. Thus, for example, double_literal does include all the inlines including #subscript, but not #single_literal or #double_literal. This is very hard to read and maintain, and it is easy to make a mistake. But I know in every case what I want to say in terms of "all of them, except for these few", so it would be really great to be able to _say_ that. m.
On Feb 9, 2014, at 8:08 PM, Matt Neuburg matt@tidbits.com wrote:
Here's a list of includes from one of the inline patterns in the AsciiDoc grammar I'm writing:
{ include = '#double_bold'; }, { include = '#double_italic'; }, { include = '#double_literal'; }, { include = '#double_unquoted'; }, { include = '#double_quote'; }, { include = '#single_bold'; }, { include = '#single_italic'; }, { include = '#single_literal'; }, { include = '#single_literal_nopassthru'; }, { include = '#single_unquoted'; }, { include = '#superscript'; }, { include = '#characters'; },
But it happens that that list is almost the same as the #inline group I've already defined. I could reduce this to a single include! There's just one problem: we must not include ourselves, i.e. #subscript; we crash if we do, and anyway it's wrong (this pattern is not in any way recursive). Thus I request that the grammar should allow me to talk like this:
{ include = '#inline'; }, { exclude = '#subscript'; },
This is not just to make the list shorter; it also makes the list more correct and coherent, because I'm allowed to say (and see) exactly the truth: "include everything except yourself".
Thanks for thinking about this - m.
-- matt neuburg, phd = matt@tidbits.com, http://www.apeth.net/matt/ pantes anthropoi tou eidenai oregontai phusei Programming iOS 7! http://shop.oreilly.com/product/0636920031017.do iOS 7 Fundamentals! http://shop.oreilly.com/product/0636920032465.do RubyFrontier! http://www.apeth.com/RubyFrontierDocs/default.html TidBITS, Mac news and reviews since 1990, http://www.tidbits.com
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate
-- matt neuburg, phd = matt@tidbits.com, http://www.apeth.net/matt/ pantes anthropoi tou eidenai oregontai phusei Programming iOS 7! http://shop.oreilly.com/product/0636920031017.do iOS 7 Fundamentals! http://shop.oreilly.com/product/0636920032465.do RubyFrontier! http://www.apeth.com/RubyFrontierDocs/default.html TidBITS, Mac news and reviews since 1990, http://www.tidbits.com