src/grammar.cpp
string Grammar::getText() const
{
    string s = "grammar " + name + ";\n";

    for(shared_ptr<Rule> r : rules)
    {
        s += r->getRuleString() + "\n";
    }

    return s;
}
/**
  * Generates the JSGF grammar and returns it as a string.
  * \return string
  */
Generates the JSGF grammar and returns it as a string.
\return string
Generates the JSGF grammar and returns it as a string . \ return string
string Grammar::getText() const
{
    string s = "grammar " + name + ";\n";
    for(shared_ptr<Rule> r : rules)
    {
        s += r->getRuleString() + "\n";
    }
    return s;
}
string Grammar :: getText ( ) const { string s = " " + name + " \n " ; for ( shared_ptr < Rule > r : rules ) { s += r -> getRuleString ( ) + " \n " ; } return s ; }
Generates the JSGF grammar and returns it as a string.
Generates the JSGF grammar and returns it as a string .