mirror of
https://github.com/Z3Prover/z3
synced 2025-04-24 01:25:31 +00:00
fixed encoding for order constraints
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
01879ed1ed
commit
705b107846
2 changed files with 15 additions and 9 deletions
|
@ -24,10 +24,12 @@ Revision History:
|
|||
class stream_buffer {
|
||||
std::istream & m_stream;
|
||||
int m_val;
|
||||
unsigned m_line;
|
||||
public:
|
||||
|
||||
stream_buffer(std::istream & s):
|
||||
m_stream(s) {
|
||||
m_stream(s),
|
||||
m_line(0) {
|
||||
m_val = m_stream.get();
|
||||
}
|
||||
|
||||
|
@ -37,7 +39,10 @@ public:
|
|||
|
||||
void operator ++() {
|
||||
m_val = m_stream.get();
|
||||
if (m_val == '\n') ++m_line;
|
||||
}
|
||||
|
||||
unsigned line() const { return m_line; }
|
||||
};
|
||||
|
||||
template<typename Buffer>
|
||||
|
@ -76,7 +81,7 @@ int parse_int(Buffer & in) {
|
|||
}
|
||||
|
||||
if (*in < '0' || *in > '9') {
|
||||
std::cerr << "(error, \"unexpected char: " << *in << "\")\n";
|
||||
std::cerr << "(error, \"unexpected char: " << *in << " line: " << in.line() << "\")\n";
|
||||
exit(3);
|
||||
exit(ERR_PARSER);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue