-#!/bin/bash
+#!/usr/bin/perl -w
+#
+# This script goes through a source directory rewriting the top bits of
+# source files to match a template (inline, below). For files with no
+# top comment, it adds a fresh one.
+#
+# It ignores any file/directory not starting with [a-zA-Z]
+# (so, this includes . and .., vi swaps, .svn meta-info,
+# .deps, etc.)
+#
+# It ignores any file not ending with one of:
+# .c .cc .cpp .C .h .hh .hpp .H .y .yy .ypp .Y .l .ll .lpp .L
+# (so, this includes emacs ~-backups, CVS detritus, etc.)
+#
+# It ignores any directory matching $excluded_directories
+# (so, you should add here any sources imported but not covered under
+# the license.)
-cd `dirname "$0"`/../src
+my $excluded_directories = '^(minisat|CVS)$';
-cat <<EOF
+# Years of copyright for the template. E.g., the string
+# "1985, 1987, 1992, 1997, 2008" or "2006-2009" or whatever.
+my $years = '2009';
+
+## end config ##
+
+use strict;
+use Fcntl ':mode';
+
+my $dir = $0;
+$dir =~ s,/[^/]+/*$,,;
+
+(chdir($dir."/..") && -f "src/include/expr.h") || die "can't find top-level source directory for CVC4";
+my $pwd = `pwd`; chomp $pwd;
+
+print <<EOF;
Warning: this script is dangerous. It will overwrite the header comments in your
source files to match the template in the script, attempting to retain file-specific
comments, but this isn't guaranteed. You should run this in an svn working directory
and run "svn diff" after to ensure everything was correctly rewritten.
The directory to search for and change sources is:
- $(pwd)
+ $pwd/src
Continue? y or n:
EOF
-read x
-if [ "$x" != 'y' -a "$x" != 'Y' -a "$x" != 'YES' -a "$x" != 'yes' ]; then
- echo Aborting operation.
- exit
-fi
-
-echo Updating sources...
-
-for FILE in $(find . -name '*.cpp' -o -name '*.h' -o -name '*.c' -o -name '*.cc' -o -name '*.hh' -o -name '*.hpp'); do
-echo $FILE
-
-perl -i -e '\
-if(m,^/\*\*\*\*\*,) {
- print "/********************* -*- C++ -*- */\n";
- print "/** (basename FILE)\n";
- print " ** This file is part of the CVC4 prototype.\n";
- print " ** Copyright (c) (date +%Y) The Analysis of Computer Systems Group (ACSys)\n";
- print " ** Courant Institute of Mathematical Sciences\n";
- print " ** New York University\n";
- print " ** See the file COPYING in the top-level source directory for licensing\n";
- print " ** information.\n";
- print " **\n";
- print " ** [[ Add file-specific comments here ]]\n";
- print " **/\n\n";
-} else {
- m,^/\*\* , || exit;
- print "/********************* -*- C++ -*- */\n";
- print "/** (basename FILE)\n";
- print " ** This file is part of the CVC4 prototype.\n";
- print " ** Copyright (c) $(date +%Y) The Analysis of Computer Systems Group (ACSys)\n";
- print " ** Courant Institute of Mathematical Sciences\n";
- print " ** New York University\n";
- print " ** See the file COPYING in the top-level source directory for licensing\n";
- print " ** information.\n";
- print " **\n";
- while(<>) {
- next if !m,^ \*\* ,;
+$_ = <STDIN>; chomp;
+die 'aborting operation' if !( $_ eq 'y' || $_ eq 'yes' || $_ eq 'Y' || $_ eq 'YES' );
+
+print "Updating sources...\n";
+
+recurse('src');
+
+sub recurse {
+ my ($srcdir) = @_;
+ opendir(my $DIR, $srcdir);
+ while(my $file = readdir $DIR) {
+ next if !($file =~ /^[a-zA-Z]/);
+
+ my $mode = (stat($srcdir.'/'.$file))[2];
+ my $is_directory = S_ISDIR($mode);
+ if($is_directory) {
+ next if $file =~ /$excluded_directories/;
+ recurse($srcdir.'/'.$file);
+ } else {
+ next if !($file =~ /\.(c|cc|cpp|C|h|hh|hpp|H|y|yy|ypp|Y|l|ll|lpp|L)$/);
+ print "$srcdir/$file...";
+ my $infile = $srcdir.'/'.$file;
+ my $outfile = $srcdir.'/#'.$file.'.tmp';
+ open(my $IN, $infile) || die "error opening $infile for reading";
+ open(my $OUT, '>', $outfile) || die "error opening $outfile for writing";
+ $_ = <$IN>;
+ if(m,^(%{)?/\*\*\*\*\*,) {
+ print "updating\n";
+ if($file =~ /\.(y|yy|ypp|Y)$/) {
+ print $OUT "%{/******************* -*- C++ -*- */\n";
+ } else {
+ print $OUT "/********************* -*- C++ -*- */\n";
+ }
+ print $OUT "/** $file\n";
+ print $OUT " ** This file is part of the CVC4 prototype.\n";
+ print $OUT " ** Copyright (c) $years The Analysis of Computer Systems Group (ACSys)\n";
+ print $OUT " ** Courant Institute of Mathematical Sciences\n";
+ print $OUT " ** New York University\n";
+ print $OUT " ** See the file COPYING in the top-level source directory for licensing\n";
+ print $OUT " ** information.\n";
+ print $OUT " **\n";
+ while(my $line = <$IN>) {
+ last if $line =~ /^ \*\*\s*$/;
+ }
+ } else {
+ print "adding\n";
+ if($file =~ /\.(y|yy|ypp|Y)$/) {
+ print $OUT "%{/******************* -*- C++ -*- */\n";
+ } else {
+ print $OUT "/********************* -*- C++ -*- */\n";
+ }
+ print $OUT "/** $file\n";
+ print $OUT " ** This file is part of the CVC4 prototype.\n";
+ print $OUT " ** Copyright (c) $years The Analysis of Computer Systems Group (ACSys)\n";
+ print $OUT " ** Courant Institute of Mathematical Sciences\n";
+ print $OUT " ** New York University\n";
+ print $OUT " ** See the file COPYING in the top-level source directory for licensing\n";
+ print $OUT " ** information.\n";
+ print $OUT " **\n";
+ print $OUT " ** [[ Add file-specific comments here ]]\n";
+ print $OUT " **/\n\n";
+ if($file =~ /\.(y|yy|ypp|Y)$/) {
+ while(my $line = <$IN>) {
+ chomp $line;
+ if($line =~ '\s*%{(.*)') {
+ print $OUT "$1\n";
+ last;
+ }
+ # just in case something's weird with the file ?
+ if(!($line =~ '\s*')) {
+ print $OUT "$line\n";
+ last;
+ }
+ }
+ }
+ }
+ while(my $line = <$IN>) {
+ print $OUT $line;
+ }
+ close $IN;
+ close $OUT;
+ rename($outfile, $infile) || die "can't rename working file \`$outfile' to \`$infile'";
+ }
}
+ closedir $DIR;
}
-while(<>) {
- print;
-}' "$FILE"
-
-done
+### Local Variables:
+### perl-indent-level: 2
+### End:
/********************* -*- C++ -*- */
/** expr.cpp
** This file is part of the CVC4 prototype.
- **
- ** Reference-counted encapsulation of a pointer to an expression.
- **
- ** The Analysis of Computer Systems Group (ACSys)
+ ** Copyright (c) 2009 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
+ ** information.
+ **
+ ** Reference-counted encapsulation of a pointer to an expression.
**/
#include "expr.h"
/********************* -*- C++ -*- */
/** expr_manager.cpp
** This file is part of the CVC4 prototype.
- **
- ** The Analysis of Computer Systems Group (ACSys)
+ ** Copyright (c) 2009 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
+ ** information.
+ **
+ ** Expression manager implementation.
**/
#include <vector>
-/*********************
+/********************* -*- C++ -*- */
/** expr_value.cpp
** This file is part of the CVC4 prototype.
+ ** Copyright (c) 2009 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
+ ** information.
**
** An expression node.
**
** Instances of this class are generally referenced through
** cvc4::Expr rather than by pointer; cvc4::Expr maintains the
** reference count on ExprValue instances and
- **
- ** The Analysis of Computer Systems Group (ACSys)
- ** Courant Institute of Mathematical Sciences
- ** New York University
**/
#include "expr_value.h"
/********************* -*- C++ -*- */
/** assert.h
** This file is part of the CVC4 prototype.
- **
- ** The Analysis of Computer Systems Group (ACSys)
+ ** Copyright (c) 2009 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
+ ** information.
+ **
**/
#ifndef __CVC4_ASSERT_H
/********************* -*- C++ -*- */
/** attr_type.h
** This file is part of the CVC4 prototype.
- **
- ** The Analysis of Computer Systems Group (ACSys)
+ ** Copyright (c) 2009 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
+ ** information.
+ **
**/
#ifndef __CVC4_ATTR_TYPE_H
/********************* -*- C++ -*- */
/** command.h
** This file is part of the CVC4 prototype.
- **
- ** The Analysis of Computer Systems Group (ACSys)
+ ** Copyright (c) 2009 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
+ ** information.
+ **
**/
#ifndef __CVC4_COMMAND_H
/********************* -*- C++ -*- */
/** context.h
** This file is part of the CVC4 prototype.
- **
- ** The Analysis of Computer Systems Group (ACSys)
+ ** Copyright (c) 2009 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
+ ** information.
+ **
**/
#ifndef __CVC4_CONTEXT_H
/********************* -*- C++ -*- */
/** debug.h
** This file is part of the CVC4 prototype.
- **
- ** The Analysis of Computer Systems Group (ACSys)
+ ** Copyright (c) 2009 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
+ ** information.
+ **
**/
#ifndef __CVC4_DEBUG_H
/********************* -*- C++ -*- */
/** decision_engine.h
** This file is part of the CVC4 prototype.
- **
- ** The Analysis of Computer Systems Group (ACSys)
+ ** Copyright (c) 2009 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
+ ** information.
+ **
**/
-#include "literal.h"
-
#ifndef __CVC4_DECISION_ENGINE_H
#define __CVC4_DECISION_ENGINE_H
+#include "literal.h"
+
namespace CVC4 {
// In terms of abstraction, this is below (and provides services to)
/********************* -*- C++ -*- */
/** exception.h
** This file is part of the CVC4 prototype.
- **
- ** Exception class.
- **
- ** The Analysis of Computer Systems Group (ACSys)
+ ** Copyright (c) 2009 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
+ ** information.
+ **
+ ** Exception class.
**/
#ifndef __CVC4_EXCEPTION_H
/********************* -*- C++ -*- */
/** expr.h
** This file is part of the CVC4 prototype.
- **
- ** Reference-counted encapsulation of a pointer to an expression.
- **
- ** The Analysis of Computer Systems Group (ACSys)
+ ** Copyright (c) 2009 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
+ ** information.
+ **
+ ** Reference-counted encapsulation of a pointer to an expression.
**/
#ifndef __CVC4_EXPR_H
/********************* -*- C++ -*- */
/** expr_attribute.h
** This file is part of the CVC4 prototype.
- **
- ** The Analysis of Computer Systems Group (ACSys)
+ ** Copyright (c) 2009 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
+ ** information.
+ **
**/
#ifndef __CVC4_EXPR_ATTRIBUTE_H
/********************* -*- C++ -*- */
/** expr_builder.h
** This file is part of the CVC4 prototype.
- **
- ** The Analysis of Computer Systems Group (ACSys)
+ ** Copyright (c) 2009 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
+ ** information.
+ **
**/
#ifndef __CVC4_EXPR_BUILDER_H
/********************* -*- C++ -*- */
/** expr_manager.h
** This file is part of the CVC4 prototype.
- **
- ** The Analysis of Computer Systems Group (ACSys)
+ ** Copyright (c) 2009 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
+ ** information.
+ **
**/
#ifndef __CVC4_EXPR_MANAGER_H
-/*********************
+/********************* -*- C++ -*- */
/** expr_value.h
** This file is part of the CVC4 prototype.
+ ** Copyright (c) 2009 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
+ ** information.
**
** An expression node.
**
** Instances of this class are generally referenced through
** cvc4::Expr rather than by pointer; cvc4::Expr maintains the
** reference count on ExprValue instances and
- **
- ** The Analysis of Computer Systems Group (ACSys)
- ** Courant Institute of Mathematical Sciences
- ** New York University
**/
#ifndef __CVC4_EXPR_VALUE_H
/********************* -*- C++ -*- */
/** kind.h
** This file is part of the CVC4 prototype.
- **
- ** The Analysis of Computer Systems Group (ACSys)
+ ** Copyright (c) 2009 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
+ ** information.
+ **
**/
#ifndef __CVC4_KIND_H
/********************* -*- C++ -*- */
/** literal.h
** This file is part of the CVC4 prototype.
- **
- ** The Analysis of Computer Systems Group (ACSys)
+ ** Copyright (c) 2009 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
+ ** information.
+ **
**/
#ifndef __CVC4_LITERAL_H
/********************* -*- C++ -*- */
/** model.h
** This file is part of the CVC4 prototype.
- **
- ** The Analysis of Computer Systems Group (ACSys)
+ ** Copyright (c) 2009 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
+ ** information.
+ **
**/
#ifndef __CVC4_MODEL_H
/********************* -*- C++ -*- */
/** parser.h
** This file is part of the CVC4 prototype.
- **
- ** Parser abstraction.
- **
- ** The Analysis of Computer Systems Group (ACSys)
+ ** Copyright (c) 2009 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
+ ** information.
+ **
+ ** Parser abstraction.
**/
#ifndef __CVC4_PARSER_H
/********************* -*- C++ -*- */
-/** exception.h
+/** parser_exception.h
** This file is part of the CVC4 prototype.
- **
- ** Exception class.
- **
- ** The Analysis of Computer Systems Group (ACSys)
+ ** Copyright (c) 2009 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
+ ** information.
+ **
+ ** Exception class.
**/
#ifndef __CVC4_PARSER_EXCEPTION_H
/********************* -*- C++ -*- */
/** prop_engine.h
** This file is part of the CVC4 prototype.
- **
- ** The Analysis of Computer Systems Group (ACSys)
+ ** Copyright (c) 2009 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
+ ** information.
+ **
**/
#ifndef __CVC4_PROP_ENGINE_H
/********************* -*- C++ -*- */
/** prover.h
** This file is part of the CVC4 prototype.
- **
- ** The Analysis of Computer Systems Group (ACSys)
+ ** Copyright (c) 2009 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
+ ** information.
+ **
**/
#ifndef __CVC4_PROVER_H
/********************* -*- C++ -*- */
/** result.h
** This file is part of the CVC4 prototype.
- **
- ** The Analysis of Computer Systems Group (ACSys)
+ ** Copyright (c) 2009 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
+ ** information.
+ **
**/
#ifndef __CVC4_RESULT_H
/********************* -*- C++ -*- */
/** sat.h
** This file is part of the CVC4 prototype.
- **
- ** The Analysis of Computer Systems Group (ACSys)
+ ** Copyright (c) 2009 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
+ ** information.
+ **
**/
#ifndef __CVC4_SAT_H
/********************* -*- C++ -*- */
/** theory.h
** This file is part of the CVC4 prototype.
- **
- ** The Analysis of Computer Systems Group (ACSys)
+ ** Copyright (c) 2009 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
+ ** information.
+ **
**/
#ifndef __CVC4_THEORY_H
/********************* -*- C++ -*- */
/** theory_engine.h
** This file is part of the CVC4 prototype.
- **
- ** The Analysis of Computer Systems Group (ACSys)
+ ** Copyright (c) 2009 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
+ ** information.
+ **
**/
#ifndef __CVC4_THEORY_ENGINE_H
/********************* -*- C++ -*- */
/** unique_id.h
** This file is part of the CVC4 prototype.
- **
- ** The Analysis of Computer Systems Group (ACSys)
+ ** Copyright (c) 2009 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
+ ** information.
+ **
**/
#ifndef __CVC4_UNIQUE_ID_H
/********************* -*- C++ -*- */
/** vc.h
** This file is part of the CVC4 prototype.
- **
- ** The Analysis of Computer Systems Group (ACSys)
+ ** Copyright (c) 2009 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
+ ** information.
+ **
**/
#ifndef __CVC4_VC_H
BUILT_SOURCES = \
pl_scanner.cpp \
pl.cpp \
- pl.h \
+ pl.hpp \
smtlib_scanner.cpp \
smtlib.cpp \
- smtlib.h
+ smtlib.hpp
# produce headers too
AM_YFLAGS = -d
smtlib_scanner.cpp: smtlib_scanner.lpp
$(LEX) $(AM_LFLAGS) $(LFLAGS) -P smtlib -o $@ $<
-pl_scanner.o: pl.h
+pl_scanner.o: pl.hpp
pl.cpp: pl.ypp
$(YACC) $(AM_YFLAGS) $(YFLAGS) -p PL -o $@ $<
-smtlib_scanner.o: smtlib.h
+smtlib_scanner.o: smtlib.hpp
smtlib.cpp: smtlib.ypp
$(YACC) $(AM_YFLAGS) $(YFLAGS) -p smtlib -o $@ $<
/********************* -*- C++ -*- */
/** parser.cpp
** This file is part of the CVC4 prototype.
+ ** Copyright (c) 2009 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
+ ** information.
**
** Parser implementation.
**
/********************* -*- C++ -*- */
/** parser_state.h
** This file is part of the CVC4 prototype.
+ ** Copyright (c) 2009 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
+ ** information.
**
** Extra state of the parser shared by the lexer and parser.
**
/********************* -*- C++ -*- */
-/** smtlib.ypp
+/** pl.ypp
** This file is part of the CVC4 prototype.
- **
- ** Reference-counted encapsulation of a pointer to an expression.
- **
- ** The Analysis of Computer Systems Group (ACSys)
+ ** Copyright (c) 2009 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
+ ** information.
**
** This file contains the bison code for the parser that reads in CVC
** commands in the presentation language (hence "PL").
/********************* -*- C++ -*- */
/** pl_scanner.lpp
** This file is part of the CVC4 prototype.
- **
- ** Reference-counted encapsulation of a pointer to an expression.
- **
- ** The Analysis of Computer Systems Group (ACSys)
+ ** Copyright (c) 2009 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
+ ** information.
+ **
+ ** CVC4 presentation language lexer.
**/
%option interactive
#include <iostream>
#include "expr_manager.h" /* for the benefit of parsePL_defs.h */
#include "parser_state.h"
-#include "pl.h"
+#include "pl.hpp"
#include "debug.h"
namespace CVC4 {
-%{/******************* -*- C++ -*- */
+%{/********************* -*- C++ -*- */
/** smtlib.ypp
** This file is part of the CVC4 prototype.
- **
- ** Reference-counted encapsulation of a pointer to an expression.
- **
- ** The Analysis of Computer Systems Group (ACSys)
+ ** Copyright (c) 2009 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
+ ** information.
**
** This file contains the bison code for the parser that reads in CVC
** commands in SMT-LIB language.
#include "parser_state.h"
// Exported shared data
-namespace CVC3 {
- extern ParserTemp* parserTemp;
+namespace CVC4 {
+ extern ParserState* parserState;
}
// Define shortcuts for various things
-#define TMP CVC3::parserTemp
-#define EXPR CVC3::parserTemp->expr
-#define VC (CVC3::parserTemp->vc)
-#define ARRAYSENABLED (CVC3::parserTemp->arrFlag)
-#define BVENABLED (CVC3::parserTemp->bvFlag)
-#define BVSIZE (CVC3::parserTemp->bvSize)
-#define RAT(args) CVC3::newRational args
-#define QUERYPARSED CVC3::parserTemp->queryParsed
+#define TMP CVC4::parserState
+#define EXPR CVC4::parserState->expr
+#define VC (CVC4::parserState->vc)
+#define ARRAYSENABLED (CVC4::parserState->arrFlag)
+#define BVENABLED (CVC4::parserState->bvFlag)
+#define BVSIZE (CVC4::parserState->bvSize)
+#define RAT(args) CVC4::newRational args
+#define QUERYPARSED CVC4::parserState->queryParsed
// Suppress the bogus warning suppression in bison (it generates
// compile error)
int smtliberror(const char *s)
{
std::ostringstream ss;
- ss << CVC3::parserTemp->fileName << ":" << CVC3::parserTemp->lineNum
+ ss << CVC4::parserState->fileName << ":" << CVC4::parserState->lineNum
<< ": " << s;
- return CVC3::parserTemp->error(ss.str());
+ return CVC4::parserState->error(ss.str());
}
%union {
std::string *str;
std::vector<std::string> *strvec;
- CVC3::Expr *node;
- std::vector<CVC3::Expr> *vec;
- std::pair<std::vector<CVC3::Expr>, std::vector<std::string> > *pat_ann;
+ CVC4::Expr *node;
+ std::vector<CVC4::Expr> *vec;
+ std::pair<std::vector<CVC4::Expr>, std::vector<std::string> > *pat_ann;
};
/********************* -*- C++ -*- */
/** smtlib_scanner.lpp
** This file is part of the CVC4 prototype.
- **
- ** Reference-counted encapsulation of a pointer to an expression.
- **
- ** The Analysis of Computer Systems Group (ACSys)
+ ** Copyright (c) 2009 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
+ ** information.
+ **
+ ** Lexer for smtlib format.
**/
%option interactive
%{
#include <iostream>
-#include "smtlib.h"
+#include "smtlib.hpp"
#include "debug.h"
namespace CVC4 {