From ebe2362bc9cb97c494d2268e9b51810b1e24c4c2 Mon Sep 17 00:00:00 2001 From: Alexandre Duret-Lutz Date: Thu, 10 May 2012 10:11:11 +0200 Subject: [PATCH] Equip the LTL parser with printers for formulas and other token. * src/ltlparse/ltlparse.yy: Add new printers. Suggested by Akim Demaille. --- THANKS | 1 + src/ltlparse/ltlparse.yy | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/THANKS b/THANKS index e73f40175..54fa34fa7 100644 --- a/THANKS +++ b/THANKS @@ -1,6 +1,7 @@ We are grateful to these people for their comments, help, or suggestions. +Akim Demaille Christian Dax Étienne Renault Felix Klaedtke diff --git a/src/ltlparse/ltlparse.yy b/src/ltlparse/ltlparse.yy index fedff4f46..c68d04eb7 100644 --- a/src/ltlparse/ltlparse.yy +++ b/src/ltlparse/ltlparse.yy @@ -35,6 +35,7 @@ #include #include "public.hh" #include "ltlast/allnodes.hh" +#include "ltlvisit/tostring.hh" struct minmax_t { unsigned min, max; }; } @@ -144,6 +145,10 @@ using namespace spot::ltl; %destructor { $$->destroy(); } %printer { debug_stream() << *$$; } +%printer { spot::ltl::to_string($$, debug_stream()); } +%printer { spot::ltl::to_string($$, debug_stream(), false, true); } sere bracedsere +%printer { debug_stream() << $$; } +%printer { debug_stream() << $$.min << ".." << $$.max; } %% result: START_LTL subformula END_OF_INPUT