[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lojban] Re: gleki xisri'i
de'i li 25 pi'e 12 pi'e 2008 la'o fy. Robin Lee Powell .fy. cusku zoi
skamyxatra.
> You seem to be relying on yacc's %prec marker.
.skamyxatra
Yes, that's the idea.
> I'd like some evidence that this reduces to a CFG, please, because it sure
> doesn't look that way to me.
I don't see how it wouldn't be a context-free grammar. A Yacc grammar without
precedence rules is context-free (albeit possibly ambiguous), correct? I am
simply indicating to Yacc how the ambiguous rules should be solved using only
the precedences of the rules and a single look-ahead token. If using LALR(1)
makes a grammar context-sensitive, you've really shot yourself in the foot.
At the very least, all of the relevant information I can find online indicates
that Yacc input is always context-free, including the official Yacc
specification at
<http://www.opengroup.org/onlinepubs/000095399/utilities/yacc.html>. Also
worth noting is the Wikipedia page for "LALR parser", which explicitly states
that LALR is used for context-free grammars.
> It looks like a yacc-specific trick.
I wouldn't call it a "trick"; it's a documented & well-known feature. Besides,
so what if it's Yacc-specific? Yacc (along with its GNU implementation, Bison)
is one of the more popular parser generators (perhaps the most popular; I can't
seem to find any usage statistics right now), and you even said in the original
e-mail announcing the challenge:
> If you produce a grammar, I don't care what parser generator it needs, or
> even if such a parser generator exists. I care only that the language is
> actually a CFG, and that a parser generator could, in principle, be built for
> whatever you came up with.
So, I guess I have two questions: what makes you think that %prec makes the
grammar non-context-free, and if you were to somehow get a working
context-sensitive grammar for a parser generator that is only expected to work
for CFGs, what would be the problem, other than being kept from showing that
Lojban grammar is context-free, which seems to be nothing more than a personal
goal of yours?
mu'omi'e la'o gy. Minimiscience .gy.
--
ko senpi lo du'u do bilga lonu senpi
To unsubscribe from this list, send mail to lojban-list-request@lojban.org
with the subject unsubscribe, or go to http://www.lojban.org/lsg2/, or if
you're really stuck, send mail to secretary@lojban.org for help.