diff options
author | Morgan Deters <mdeters@gmail.com> | 2011-04-23 05:15:56 +0000 |
---|---|---|
committer | Morgan Deters <mdeters@gmail.com> | 2011-04-23 05:15:56 +0000 |
commit | 57b8c4c8581d2d3ffcf3d3a1bb228271cb4d074a (patch) | |
tree | 1c1781cc83118e4bbd2ad6939b16734c30a69f1a /src/parser/bounded_token_buffer.cpp | |
parent | 673d0e86b91094a58433c3ca71591fb0a0c60f84 (diff) |
* reviewed BooleanSimplification, added documentation & unit test
* work around a lexer ambiguity in CVC grammar
* add support for tracing antlr parser/lexer
* add parsing support for more language features
* initial parameterized types parsing work to support Andy's work
Diffstat (limited to 'src/parser/bounded_token_buffer.cpp')
-rw-r--r-- | src/parser/bounded_token_buffer.cpp | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/parser/bounded_token_buffer.cpp b/src/parser/bounded_token_buffer.cpp index 6a94d877a..d77f72bfa 100644 --- a/src/parser/bounded_token_buffer.cpp +++ b/src/parser/bounded_token_buffer.cpp @@ -5,7 +5,7 @@ ** Major contributors: none ** Minor contributors (to current version): mdeters ** This file is part of the CVC4 prototype. - ** Copyright (c) 2009, 2010 The Analysis of Computer Systems Group (ACSys) + ** Copyright (c) 2009, 2010, 2011 The Analysis of Computer Systems Group (ACSys) ** Courant Institute of Mathematical Sciences ** New York University ** See the file COPYING in the top-level source directory for licensing @@ -385,7 +385,8 @@ dbgLA (pANTLR3_INT_STREAM is, ANTLR3_INT32 i) static ANTLR3_MARKER mark (pANTLR3_INT_STREAM is) { - Unreachable(); + is->lastMarker = is->index(is); + return is->lastMarker; } /// As per mark() but with a call to tell the debugger we are doing this @@ -435,7 +436,7 @@ rewindLast (pANTLR3_INT_STREAM is) static void rewindStream (pANTLR3_INT_STREAM is, ANTLR3_MARKER marker) { - Unreachable(); + is->seek(is, (ANTLR3_UINT32)(marker)); } static void dbgRewindStream (pANTLR3_INT_STREAM is, ANTLR3_MARKER marker) @@ -446,7 +447,13 @@ dbgRewindStream (pANTLR3_INT_STREAM is, ANTLR3_MARKER marker) static void seek (pANTLR3_INT_STREAM is, ANTLR3_MARKER index) { - Unreachable(); + pANTLR3_COMMON_TOKEN_STREAM cts; + pANTLR3_TOKEN_STREAM ts; + + ts = (pANTLR3_TOKEN_STREAM) is->super; + cts = (pANTLR3_COMMON_TOKEN_STREAM) ts->super; + + cts->p = (ANTLR3_UINT32)index; } static void dbgSeek (pANTLR3_INT_STREAM is, ANTLR3_MARKER index) |