Commit graph

8 commits

Author SHA1 Message Date
Leonardo de Moura
555d26aa61 feat(frontends/lean/pp): take notation declarations into account when pretty printing
TODO: support foldl/foldr and binders
2014-10-19 08:41:29 -07:00
Leonardo de Moura
b3e05a2fe9 refactor(frontends/lean/scanner): remove dependency to seekg and unget
methods

It is not safe to use seekg for textual files. Here is a fragment from a
C++ manual:

seekg() and seekp()

This pair of functions serve respectively to change the position of stream pointers get and put. Both functions are overloaded with two different prototypes:

     seekg ( pos_type position );
     seekp ( pos_type position );

Using this prototype the stream pointer is changed to an absolute position from the beginning of the file. The type required is the same as that returned by functions tellg and tellp.

      seekg ( off_type offset, seekdir direction );
      seekp ( off_type offset, seekdir direction );

Using this prototype, an offset from a concrete point determined by
parameter direction can be specified. It can be:

          ios::beg	offset specified from the beginning of the stream
          ios::cur	offset specified from the current position of the stream pointer
          ios::end	offset specified from the end of the stream

The values of both stream pointers get and put are counted in different
ways for text files than for binary files, since in text mode files some
modifications to the appearance of some special characters can
occur. For that reason it is advisable to use only the first prototype
of seekg and seekp with files opened in text mode and always use
non-modified values returned by tellg or tellp. With binary files, you
can freely use all the implementations for these functions. They should
not have any unexpected behavior.
2014-09-18 15:24:48 -07:00
Leonardo de Moura
05c6e1461e fix(tests/lean/interactive): interactive tests expected output, they must include the new '-- BEGINWAIT' messages
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-09-09 09:47:19 -07:00
Leonardo de Moura
6632a50015 refactor(library): add namespaces 'or', 'and' and 'iff'
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-09-04 21:25:21 -07:00
Leonardo de Moura
2ca0a22e2c fix(tests/lean/interactive/in4): adjust test
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-09-03 01:35:46 -07:00
Leonardo de Moura
b7d7f12b8e fix(frontends/lean/info_manager): several bugs: invalid flag was not being reset for empty lines, merge with overwrite=false was adding 'poluting' state, --NAY generation
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-30 10:35:36 -07:00
Leonardo de Moura
59d3227eaa fix(tests/lean/interactive): test output
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-29 18:17:07 -07:00
Leonardo de Moura
8de9cab62d test(tests/lean/interactive): add --server test
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-28 07:41:38 -07:00