Equip the LTL parser with printers for formulas and other token.
* src/ltlparse/ltlparse.yy: Add new printers. Suggested by Akim Demaille.
This commit is contained in:
parent
509edabab4
commit
ebe2362bc9
2 changed files with 6 additions and 0 deletions
1
THANKS
1
THANKS
|
|
@ -1,6 +1,7 @@
|
||||||
We are grateful to these people for their comments, help, or
|
We are grateful to these people for their comments, help, or
|
||||||
suggestions.
|
suggestions.
|
||||||
|
|
||||||
|
Akim Demaille
|
||||||
Christian Dax
|
Christian Dax
|
||||||
Étienne Renault
|
Étienne Renault
|
||||||
Felix Klaedtke
|
Felix Klaedtke
|
||||||
|
|
|
||||||
|
|
@ -35,6 +35,7 @@
|
||||||
#include <string>
|
#include <string>
|
||||||
#include "public.hh"
|
#include "public.hh"
|
||||||
#include "ltlast/allnodes.hh"
|
#include "ltlast/allnodes.hh"
|
||||||
|
#include "ltlvisit/tostring.hh"
|
||||||
|
|
||||||
struct minmax_t { unsigned min, max; };
|
struct minmax_t { unsigned min, max; };
|
||||||
}
|
}
|
||||||
|
|
@ -144,6 +145,10 @@ using namespace spot::ltl;
|
||||||
%destructor { $$->destroy(); } <ltl>
|
%destructor { $$->destroy(); } <ltl>
|
||||||
|
|
||||||
%printer { debug_stream() << *$$; } <str>
|
%printer { debug_stream() << *$$; } <str>
|
||||||
|
%printer { spot::ltl::to_string($$, debug_stream()); } <ltl>
|
||||||
|
%printer { spot::ltl::to_string($$, debug_stream(), false, true); } sere bracedsere
|
||||||
|
%printer { debug_stream() << $$; } <num>
|
||||||
|
%printer { debug_stream() << $$.min << ".." << $$.max; } <minmax>
|
||||||
|
|
||||||
%%
|
%%
|
||||||
result: START_LTL subformula END_OF_INPUT
|
result: START_LTL subformula END_OF_INPUT
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue