From a28ead2dce84082a1a6774f2caac411499d43c6d Mon Sep 17 00:00:00 2001 From: Alexandre Duret-Lutz Date: Tue, 3 Nov 2015 11:58:40 +0100 Subject: [PATCH] org: simply calls to parse_aut() * doc/org/tut20.org, doc/org/tut21.org, doc/org/tut30.org: Simplify the calls to parse_aut. --- doc/org/tut20.org | 5 ++--- doc/org/tut21.org | 3 +-- doc/org/tut30.org | 3 +-- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/doc/org/tut20.org b/doc/org/tut20.org index babfb62f4..08600fe7d 100644 --- a/doc/org/tut20.org +++ b/doc/org/tut20.org @@ -142,9 +142,8 @@ non-empty. int main() { - std::string input = "tut20.never"; spot::bdd_dict_ptr dict = spot::make_bdd_dict(); - spot::parsed_aut_ptr pa = parse_aut(input, dict); + spot::parsed_aut_ptr pa = parse_aut("tut20.never", dict); if (pa->format_errors(std::cerr)) return 1; // This cannot occur when reading a never claim, but @@ -215,7 +214,7 @@ processed in a loop. For this, you would instanciate a =automaton_stream_parser= object and call its =parse()= method in a loop. Each call to this method will either return one automaton, or =nullptr= if there is no more automaton to read. The =parse_aut()= -function is actually a simple convenience wrapper that instanciate +function is actually a simple convenience wrapper that instantiates an =automaton_stream_parser= and calls its =parse()= method once. diff --git a/doc/org/tut21.org b/doc/org/tut21.org index 23d17fd87..c1e2f0996 100644 --- a/doc/org/tut21.org +++ b/doc/org/tut21.org @@ -70,8 +70,7 @@ corresponding BDD variable number, and then use for instance int main() { - std::string input = "tut21.hoa"; - spot::parsed_aut_ptr pa = parse_aut(input, spot::make_bdd_dict()); + spot::parsed_aut_ptr pa = parse_aut("tut21.hoa", spot::make_bdd_dict()); if (pa->format_errors(std::cerr)) return 1; // This cannot occur when reading a never claim, but diff --git a/doc/org/tut30.org b/doc/org/tut30.org index 63558fb35..e52d69323 100644 --- a/doc/org/tut30.org +++ b/doc/org/tut30.org @@ -239,8 +239,7 @@ automaton to process. int main() { - std::string input = "tut30.hoa"; - spot::parsed_aut_ptr pa = parse_aut(input, spot::make_bdd_dict()); + spot::parsed_aut_ptr pa = parse_aut("tut30.hoa", spot::make_bdd_dict()); if (pa->format_errors(std::cerr)) return 1; if (pa->aborted)