[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: How the grammar flattens
Stuart, As background our discussion this afternoon, I did this little exercise of flattening the EBNF to show what the various options produce (seems worth sharing with the TC as well): ** current CGM:1999 grammar with RT/AT/... ** APS proposal using <spanned text> (in RTF file) ** APS proposal using new <partial text substring> production Currently, if you unwind (flatten) all of the intermediate, non-terminal productions in H.3.5, this is what you get for legal RT/AT/.../AT data sequences: <RESTRICTED TEXT> <extent> <point> <NOT FINAL> <string> <partial text attribute element>* <APPEND TEXT> <NOT FINAL> <string> <partial text attribute element>* ... <APPEND TEXT> <FINAL> <string> If we were to change <picture element>* in the <application structure> production of H.3.1 to <picture element>* | <spanned text> , as I originally proposed (current RTF file), then we would get a sequence like this (using some abbreviations) when we flatten the EBNF: <RT> <ext> <pt> <NOT FINAL> <string> <partial txt attr elt>* ... <BEGIN APS>...<BEGIN APS BODY> <AT> <NOT FINAL> <string> <partial txt attr elt>* <END APS> ... <AT> <FINAL> <string> It has the somewhat artificial restriction that attributes can only occur after the string, at the end of the APS. Suppose instead we use a new production in H.3.1 in the APS body, in place of the current <picture element>*: <picture element>* | <partial text substring> and define it in H.3.5 with one new production (using some abbreviations only for this email convenience): <partial text substring> ::= <partial txt attr elt>* <AT> <NOT FINAL> <string> <partial txt attr elt>* Then when we flatten the EBNF we get results like: <RT> <ext> <pt> <NOT FINAL> <string> <partial txt attr elt>* ... <BEGIN APS>...<BEGIN APS BODY> <partial txt attr elt>* <AT> <NOT FINAL> <string> <partial txt attr elt>* <END APS> ... <AT> <FINAL> <string> It doesn't really cost much, and removes a rather arbitrary restriction. Talk to you later, -Lofton.
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]