I am using Parse Kit and I have question with grammar.
This my grammar string below:
self.grammar = @" \
@start = sentence+; \
sentence = adjectives subjects will verbs subjects '.'; \
subjects = 'i' | 'you' | 'he' | 'she' | 'it' | 'they' | 'we' | 'who else' | 'Apples QA' | 'Hitler' | 'dance';\
verbs = 'eat' | 'sleep' | 'dance' | 'kill' | 'care'; \
will = 'will'; \
adjectives = 'awesome' | 'red' | 'beautiful' | 'odd' | 'useless' | 'temporary';";
So, I suppose that I can create sentence that includes rules of all my terms.
Like in line: "sentence = adjectives subjects will verbs subjects '.';"
So input string from user looks like this: "awesome you will care Apples QA"
I have added delegate (assembler) methods into my assembler like this:
but parser invoked just two of them: didMatchAdjectives and didMatchWill
How come?
You've got a typo: term calls 'subjects', but method is didMatchSubject, not didMatchSubjects