>3. I'm uncertain as to whether "embellishing" an operator on the left >via a font call or an accent is read as such. The language > > When an operator is directly followed by another > (postfix or infix) operator with the attribute > embellisher=true, the first operator is "embellished" > by the second one (and by its right operand, if > any). The parser generates an internal expression > headed by moperator (before applying transformation > rules), and treats it as if it was itself an operator > with the attributes of its "base" (the embellished > operator), i.e. uses them for parsing the surrounding > source text. > >makes me think that "˜ +" may be regarded as something else. >How is embellishment-from-the-left handled? I take it that you are suggesting ˜ would be a prefix operator which would add a tilde above the +. (Is this standard?) Another topic I listed as "to be dealt with later" was <li>how diacritics are represented as overscripts</li> (as well as the "overscript" operation itself). A summary now: we propose using the general "overscript" operator, with linear syntax base ^^ overscript, which can place any expression directly above any other one, for adding special characters above other characters as diacritical marks. (Nothing would prevent a renderer from detecting that the overscript and the base were certain specific characters, and in that case using one special character containing both of them.) For example, if ˜ was a special "letterlike" character (and thus not an operator), so that it parsed as an identifier, a + ^^ &tilde b would render something like ~ a + b (If ˜ was not letterlike, one could use th string literal "˜" instead.) Using this method for supporting diacritics, embellishment-from- the-right would always be sufficient for them. Is this method for supporting diacritics acceptable? This leaves the case of embellishment by a prefix operator for font-change. I agree that if we had that feature it would be desirable to support embellishment from the left. (Are there any other such cases?) I have not thought about whether it is possible to parse embellishment-from-the-left together with the other features specified for the parser. Perhaps Neil can comment on whether the Mathematica parser (which is closely related to the proposed one) could in principle be extended to handle this case. (If this feature turns out to be possible and desirable, and is added, it would no longer be sufficient to declare certain operators as "embellishers" in the dictionary, since one would have to specify which of their arguments was being embellished by the other one. )Received on Sunday, 2 June 1996 18:25:28 UTC
This archive was generated by hypermail 2.4.0 : Saturday, 15 April 2023 17:19:57 UTC