Enable parsing stand-alone rational expressions with the LTL parser.
* src/ltlparse/ltlparse.yy (parse_ratexp): New function. (START_LTL, START_RATEXP): Add these new tokens. (result): Parse and LTL formula or a rational expression depending on the start symbol. * src/ltlparse/public.hh (parse_ratexp): New function. * src/ltlparse/parsedecl.hh (flex_set_buffer): Add a new argument to set the starting rule. * src/ltlparse/ltlscan.ll (flex_set_buffer): Adjust. (start_token): New global variable. Return this as first token if it is set.
This commit is contained in:
parent
c6dd811b08
commit
9aebb80e08
4 changed files with 92 additions and 19 deletions
|
|
@ -1,3 +1,5 @@
|
|||
// Copyright (C) 2010 Laboratoire de Recherche et Développement de
|
||||
// l'Epita (LRDE)
|
||||
// Copyright (C) 2003, 2005 Laboratoire d'Informatique de Paris 6 (LIP6),
|
||||
// département Systèmes Répartis Coopératifs (SRC), Université Pierre
|
||||
// et Marie Curie.
|
||||
|
|
@ -29,6 +31,6 @@
|
|||
int ltlyylex (ltlyy::parser::semantic_type *yylval, ltlyy::location *yylloc)
|
||||
YY_DECL;
|
||||
|
||||
void flex_set_buffer(const char *buf);
|
||||
void flex_set_buffer(const char *buf, int start_tok);
|
||||
|
||||
#endif // SPOT_LTLPARSE_PARSEDECL_HH
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue