diff options
author | Christopher L. Conway <christopherleeconway@gmail.com> | 2010-04-29 19:45:24 +0000 |
---|---|---|
committer | Christopher L. Conway <christopherleeconway@gmail.com> | 2010-04-29 19:45:24 +0000 |
commit | ac8b46fe3b5256e387da724b7c3abfb59d25531e (patch) | |
tree | f2ecd4914fe011cabbc77f8a76ffc199e6398012 /src/parser/input.h | |
parent | 3cb49313dbefe6111414dafa521e006d45eb72d8 (diff) |
(Not) Handling parameterized sorts in SMT v2
Diffstat (limited to 'src/parser/input.h')
-rw-r--r-- | src/parser/input.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/parser/input.h b/src/parser/input.h index 21c5c4869..ecc2063db 100644 --- a/src/parser/input.h +++ b/src/parser/input.h @@ -167,7 +167,10 @@ public: /** Retrieve the text associated with a token. */ inline static std::string tokenText(pANTLR3_COMMON_TOKEN token); - + /** Retrieve an Integer from the text of a token */ + inline static Integer tokenToInteger( pANTLR3_COMMON_TOKEN token ); + /** Retrieve a Rational from the text of a token */ + inline static Rational tokenToRational(pANTLR3_COMMON_TOKEN token); protected: /** Create an input. This input takes ownership of the given input stream, @@ -231,6 +234,16 @@ std::string Input::tokenText(pANTLR3_COMMON_TOKEN token) { return txt; } +Integer Input::tokenToInteger(pANTLR3_COMMON_TOKEN token) { + Integer i( tokenText(token) ); + return i; +} + +Rational Input::tokenToRational(pANTLR3_COMMON_TOKEN token) { + Rational r( tokenText(token) ); + return r; +} + }/* CVC4::parser namespace */ }/* CVC4 namespace */ |