Similar Posts

Subscribe
Notify of
3 Answers
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Destranix
2 years ago

The derivation rules are clear in themselves, since only B has an alternative.

And otherwise, you just have to replace one of the non-terminals with the result of its derivative rule.

Trivially, you do this by trial and error, see if it works and if not, reset:

 abccdef S S->aBC bccdef aBC B->b ccdef abC C->aD ERROR => Rollback bccdef aBC B->dc ERROR => WORD NOT ACCEPTED

The rollback resets the state to the last unchecked alternative. At the end, we no longer have such an alternative and see that the word does not appear in the grammar.

Destranix
2 years ago
Reply to  qed2fwe

Kein Problem, kann passieren.