Consider the "closed monster" with three closed operators.
name
ar
syntax
a
0
#
b
1
#.#
c
2
#.#.#
What is the correct parse of ##### ?
Given that there are only closed operators, we only consider this stage. Recall that closed operators all lie at the highest precedence level. Recall further, that the lower the arity the higher the "local" or "level-internal" precedence.
Two possibilities arise, namely c(a,a,a) and b(b(a)).
Which is "correct"?
Certainly c(a,a,a) has lower precedence and so in an import sense is the most appropriate choice. This choice, however, is context-sensitive (and is chosen by our context-sensitive parser).
On the other hand, b(b(a)) is chosen by the context-free parser.
Last edit: Graham Barbour 2014-04-07
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Consider the "closed monster" with three closed operators.
What is the correct parse of ##### ?
Given that there are only closed operators, we only consider this stage. Recall that closed operators all lie at the highest precedence level. Recall further, that the lower the arity the higher the "local" or "level-internal" precedence.
Two possibilities arise, namely c(a,a,a) and b(b(a)).
Which is "correct"?
Certainly c(a,a,a) has lower precedence and so in an import sense is the most appropriate choice. This choice, however, is context-sensitive (and is chosen by our context-sensitive parser).
On the other hand, b(b(a)) is chosen by the context-free parser.
Last edit: Graham Barbour 2014-04-07
The context-free approach.
When faced with #####, given the initial pheme #, we will try first to match a c(.,.) root, if not, then a b(.,.,) root.
Removing the initial single pheme morpheme, leaves ####.
Free of any knowlege that we a trying for a c(.,.)
Last edit: Graham Barbour 2014-04-07