The be-verb is optional in S. "S = NP" is completely valid grammatically. Also "adj = BUN* verb | B* NP be-verb" if you allow "i-adjectives" to be classed as verb phrases (as they were historically) and "na-adjectives" to be "noun-phrase ni aru". So you would actually get:
SENTENCE = VP | NP
VP = BUN* verb | BUN* NP be-verb
BUN = NP pp | adv
NP = VP? noun
I'm also not sure about the fact that "adv NP be-verb" is allowed by this grammar...Edit: spelling
The grandparent point about recursive rule(s) is valid however and their easiness is one of my favorite things in Japanese grammar.
Anyway, the problem seems easy at first but it’s totally possible to vaste hours perfecting a grammar that still doesn’t capture frequently occurring construction (been there done that).
With, of course, some exceptions. I'm confident there are exceptions in Japanese as well, being as exceptions are the rule in natural languages.
モンタナにいるひとはうつくしいひとだ。
This sentence is accepted by the parser shown in the article and is conceptually the same as 「築地 で 食った 寿司 は うまい 寿司 だった 。」 (save for the use of past tense, which, for this purpose, is irrelevant).
(S (JAR (noun-no モンタナ) (LID に))
(JAR (M (verb-u いる)) (noun-no ひと) (LID は))
(SFF (M (verb-i うつくしい)) (noun-no ひと) (da だ)))
Note how Montana is at the same level of nesting as everything else, rather than being part of the modifier describing the person.The parser just turns every sentence into a flat list. Imagine a parser for a programming language that parses every single line, but doesn't group lines in the same function, loop, conditional etc. together. Unless the language is assembly, you wouldn't be able to get away with that.
It all comes down to the precedence levels of the LID particles (に, は, で etc.), doesn't it. I'm not sure if those are well-defined, but I think it would feel more natural for a native speaker to evaluate に before は in nearly all cases. The order between で and は seems more elusive. I'll definitely bring this up in our conversation group next time, though I'm sure I'll get some funny looks for it.
Here's how I (Japanese native) would do it:
Warning: this is a highly simplistic version. But this way, things like "今日 築地 で 寿司 を 食った 。 (Today Tsukiji [place-mark] sushi [object-mark] ate .)" could be parsed as follows: Then, this can be further extended to a compound sentence: "築地 で 食った 寿司 は うまい 寿司 だった 。 (Tsukiji [place-mark] ate sushi [subject-mark] good sushi was .)" p.s. Yoda has nothing to do with this grammar.