[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lojban] The efficacy of Lojban's grammar.
On Sat, Apr 10, 2010 at 10:47:56AM -0400, Kevin Reid wrote:
> In particular, the trees have a huge number of nodes which pertain
> only to the implementation structure of the grammar and are both
> redundant and unrelated to the semantics of Lojban. This falls out
> from the fact that the parser produces one tree node per
> nonterminal, named according to that nonterminal, unconditionally:
> no appropriate specialized actions/transformations have been
> defined.
If *that* is what Andrew was talking about, I concede the point.
As an exercise, a sentence grabbed from #lojban, which I will parse
myself:
ru'a so'i lo jbopre na ba jimpe
No attempt to match the labels in the grammar. * marks terminals.
This is from memory, without looking at anything for reference.
utterance
-> free
-> ru'a *
-> sentence
-> front-bit [1]
-> sumti
-> quantifier
-> so'i *
-> gadri-and-friends
-> gadri
-> lo *
-> bridi-tail [2]
-> selbri
-> jbopre *
-> bridi-tail [2]
-> negator-and-friends
-> negator
-> na *
-> negated bits
-> tense
-> ba *
-> selbri
-> jimpe *
The actual parse tree, from camxes:
text
|- CMAVO
| UI: ru'a
|- sentence
|- sumti5
| |- CMAVO
| | PA: so'i
| |- sumti6
| |- CMAVO
| | LE: lo
| |- BRIVLA
| lujvo: jbopre
|- selbri1
|- CMAVO
| NA: na
|- selbri
|- time
| |- CMAVO
| | PU: ba
|- BRIVLA
gismu: jimpe
That's camxes in collapse-singletons mode.
I don't see any significant difference.
Now, if the claim is that my internal parse tree doesn't look like
the *full* parse tree, then I concur wholeheartedly and apologize
for my hostility; see the full parse tree below
-Robin
[1]: There's a special non-terminal for, basically, "the stuff
before the selbri". I freely admit that I wouldn't know about it if
I hadn't worked on the PEG.
[2]: I freely admit that I wouldn't know about this if I hadn't worked
on the PEG.
Full parse tree:
text
|- textPart2
| indicators
| indicator
| UIClause
| UIPre
| UI
| CMAVO
| UI: ru'a
|- text1
paragraphs
paragraph
statement ...
statement3
sentence
|- terms ...
| terms2
| term
| term1
| sumti ...
| sumti5
| |- quantifier
| | number
| | PAClause
| | PAPre
| | PA
| | CMAVO
| | PA: so'i
| |- sumti6
| |- LEClause
| | LEPre
| | LE
| | CMAVO
| | LE: lo
| |- sumtiTail
| sumtiTail1
| selbri ...
| selbri6
| tanruUnit ...
| tanruUnit2
| BRIVLAClause
| BRIVLAPre
| BRIVLA
| BRIVLA
| lujvo: jbopre
|- bridiTail ...
bridiTail3
selbri
selbri1
|- NAClause
| NAPre
| NA
| CMAVO
| NA: na
|- selbri
|- tag
| tenseModal
| simpleTenseModal
| time
| |- timeOffset
| | PUClause
| | PUPre
| | PU
| | CMAVO
| | PU: ba
| |- timeOffset
| PUClause
| PUPre
| PU
| CMAVO
| PU: ba
|- selbri1 ...
selbri6
tanruUnit ...
tanruUnit2
BRIVLAClause
BRIVLAPre
BRIVLA
BRIVLA
gismu: jimpe
--
You received this message because you are subscribed to the Google Groups "lojban" group.
To post to this group, send email to lojban@googlegroups.com.
To unsubscribe from this group, send email to lojban+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/lojban?hl=en.