Generate sentences from cf grammar. Fix list initialization from copy constructor
This commit is contained in:
parent
d888aeb2b4
commit
6fcfa075f8
4 changed files with 84 additions and 4 deletions
|
|
@ -23,7 +23,11 @@ void run(const String& source) {
|
|||
|
||||
printf("Grammar accepted.\n");
|
||||
|
||||
printf("Example text formed from grammar : TODO\n");
|
||||
List<CfGrammar::Sentence> sentences;
|
||||
grammar.generateSentences(sentences);
|
||||
|
||||
printf("Example sentences formed from grammar: \n");
|
||||
for (auto sentence : sentences) tp::CfGrammar::printSentence(sentence.data());
|
||||
|
||||
CfGrammar::deinitializeCfGrammarParser(state);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue