Line 543: |
Line 543: |
| There are several abuses of notation that commonly tolerated in the use of covering relations. The worst offense is that of allowing symbols to stand equivocally either for individual strings or else for their types. There is a measure of consistency to this practice, considering the fact that perfectly individual entities are rarely if ever grasped by means of signs and finite expressions, which entails that every appearance of an apparent token is only a type of more particular tokens, and meaning in the end that there is never any recourse but to the sort of discerning interpretation that can decide just how each sign is intended. In view of all this, I continue to permit expressions like <math>t <: T\!</math> and <math>T <: S,\!</math> where any of the symbols <math>t, T, S\!</math> can be taken to signify either the tokens or the subtypes of their covering types. | | There are several abuses of notation that commonly tolerated in the use of covering relations. The worst offense is that of allowing symbols to stand equivocally either for individual strings or else for their types. There is a measure of consistency to this practice, considering the fact that perfectly individual entities are rarely if ever grasped by means of signs and finite expressions, which entails that every appearance of an apparent token is only a type of more particular tokens, and meaning in the end that there is never any recourse but to the sort of discerning interpretation that can decide just how each sign is intended. In view of all this, I continue to permit expressions like <math>t <: T\!</math> and <math>T <: S,\!</math> where any of the symbols <math>t, T, S\!</math> can be taken to signify either the tokens or the subtypes of their covering types. |
| | | |
− | <pre>
| + | '''Note.''' For some time to come in the discussion that follows, although I will continue to focus on the cactus language as my principal object example, my more general purpose will be to develop the subject matter of the formal languages and grammars. I will do this by taking up a particular method of ''stepwise refinement" and using it to extract a rigorous formal grammar for the cactus language, starting with little more than a rough description of the target language and applying a systematic analysis to develop a sequence of increasingly |
− | o~~~~~~~~~o~~~~~~~~~o~~~~~~~~~o~~~~~~~~~o~~~~~~~~~o
| |
− | | |
− | For some time to come in the discussion that follows, | |
− | although I will continue to focus on the cactus language | |
− | as my principal object example, my more general purpose will | |
− | be to develop and to demonstrate the subject materials and the | |
− | technical methodology of the theory of formal languages and grammars.
| |
− | I will do this by taking up a particular method of "stepwise refinement" | |
− | and using it to extract a rigorous formal grammar for the cactus language, | |
− | starting with little more than a rough description of the target language | |
− | and applying a systematic analysis to develop a sequence of increasingly | |
| more effective and more exact approximations to the desired grammar. | | more effective and more exact approximations to the desired grammar. |
| | | |
− | o~~~~~~~~~o~~~~~~~~~o~~~~~~~~~o~~~~~~~~~o~~~~~~~~~o
| + | Employing the notion of a covering relation it becomes possible to redescribe the cactus language <math>\mathfrak{L} = \mathfrak{C} (\mathfrak{P})</math> in the following ways. |
| | | |
− | Employing the notion of a covering relation it becomes possible to
| + | ===Grammar 1=== |
− | redescribe the cactus language !L! = !C!(!P!) in the following way.
| |
| | | |
| + | <pre> |
| Grammar 1 is something of a misnomer. It is nowhere near exemplifying | | Grammar 1 is something of a misnomer. It is nowhere near exemplifying |
| any kind of a standard form and it is only intended as a starting point | | any kind of a standard form and it is only intended as a starting point |
Line 788: |
Line 777: |
| surcatenation of sentences, and so to obtain the following | | surcatenation of sentences, and so to obtain the following |
| form of a grammar: | | form of a grammar: |
| + | </pre> |
| | | |
| + | ===Grammar 2=== |
| + | |
| + | <pre> |
| | !C!(!P!). Grammar 2 | | | !C!(!P!). Grammar 2 |
| | | | | |
Line 866: |
Line 859: |
| intermediate symbols, as string variables and as type names, apply | | intermediate symbols, as string variables and as type names, apply |
| again to the letter "F". | | again to the letter "F". |
| + | </pre> |
| | | |
| + | ===Grammar 3=== |
| + | |
| + | <pre> |
| | !C!(!P!). Grammar 3 | | | !C!(!P!). Grammar 3 |
| | | | | |
Line 978: |
Line 975: |
| Grammar 4 has the intermediate alphabet !Q! = {"S'", "T", "T'"}, with | | Grammar 4 has the intermediate alphabet !Q! = {"S'", "T", "T'"}, with |
| the set !K! of covering production rules as listed in the next display. | | the set !K! of covering production rules as listed in the next display. |
| + | </pre> |
| | | |
| + | ===Grammar 4=== |
| + | |
| + | <pre> |
| | !C!(!P!). Grammar 4 | | | !C!(!P!). Grammar 4 |
| | | | | |
Line 1,102: |
Line 1,103: |
| Grammar 5 is a context-free grammar for the painted cactus language | | Grammar 5 is a context-free grammar for the painted cactus language |
| that uses !Q! = {"S'", "T"}, with !K! as listed in the next display. | | that uses !Q! = {"S'", "T"}, with !K! as listed in the next display. |
| + | </pre> |
| + | |
| + | ===Grammar 5=== |
| | | |
| + | <pre> |
| | !C!(!P!). Grammar 5 | | | !C!(!P!). Grammar 5 |
| | | | | |
Line 1,136: |
Line 1,141: |
| accumulating all the benefits of the context-free format in Grammar 5. | | accumulating all the benefits of the context-free format in Grammar 5. |
| A plausible synthesis of most of these features is given in Grammar 6. | | A plausible synthesis of most of these features is given in Grammar 6. |
| + | </pre> |
| | | |
| + | ===Grammar 6=== |
| + | |
| + | <pre> |
| | !C!(!P!). Grammar 6 | | | !C!(!P!). Grammar 6 |
| | | | | |