Commit 8cb2b5e9 authored by no_author's avatar no_author
Browse files

This commit was manufactured by cvs2svn to create tag 'start'.

parent b5cd4e74
# The "checkoutlist" file is used to support additional version controlled
# administrative files in $CVSROOT/CVSROOT, such as template files.
#
# The first entry on a line is a filename which will be checked out from
# the corresponding RCS file in the $CVSROOT/CVSROOT directory.
# The remainder of the line is an error message to use if the file cannot
# be checked out.
#
# File format:
#
# [<whitespace>]<filename>[<whitespace><error message>]<end-of-line>
#
# comment lines begin with '#'
# The "commitinfo" file is used to control pre-commit checks.
# The filter on the right is invoked with the repository and a list
# of files to check. A non-zero exit of the filter program will
# cause the commit to be aborted.
#
# The first entry on a line is a regular expression which is tested
# against the directory that the change is being committed to, relative
# to the $CVSROOT. For the first match that is found, then the remainder
# of the line is the name of the filter to run.
#
# Format strings present in the filter will be replaced as follows:
# %p = path relative to repository
# %r = repository (path portion of $CVSROOT)
# %{s} = file name, file name, ...
#
# If no format strings are present in the filter string, a default of
# " %r %s" will be appended to the filter string, but this usage is
# deprecated.
#
# If the repository name does not match any of the regular expressions in this
# file, the "DEFAULT" line is used, if it is specified.
#
# If the name "ALL" appears as a regular expression it is always used
# in addition to the first matching regex or "DEFAULT".
# Set this to "no" if pserver shouldn't check system users/passwords
#SystemAuth=no
# Put CVS lock files in this directory rather than directly in the repository.
#LockDir=/var/lock/cvs
# Set `TopLevelAdmin' to `yes' to create a CVS directory at the top
# level of the new working directory when using the `cvs checkout'
# command.
#TopLevelAdmin=no
# Set `LogHistory' to `all' or `TOEFWUPCGMAR' to log all transactions to the
# history file, or a subset as needed (ie `TMAR' logs all write operations)
#LogHistory=TOEFWUPCGMAR
# Set `RereadLogAfterVerify' to `always' (the default) to allow the verifymsg
# script to change the log message. Set it to `stat' to force CVS to verify
# that the file has changed before reading it (this can take up to an extra
# second per directory being committed, so it is not recommended for large
# repositories. Set it to `never' (the previous CVS behavior) to prevent
# verifymsg scripts from changing the log message.
#RereadLogAfterVerify=always
# Set `UserAdminOptions' to the list of `cvs admin' commands (options)
# that users not in the `cvsadmin' group are allowed to run. This
# defaults to `k', or only allowing the changing of the default
# keyword expansion mode for files for users not in the `cvsadmin' group.
# This value is ignored if the `cvsadmin' group does not exist.
#
# The following string would enable all `cvs admin' commands for all
# users:
#UserAdminOptions=aAbceIklLmnNostuU
# Set `UseNewInfoFmtStrings' to `no' if you must support a legacy system by
# enabling the deprecated old style info file command line format strings.
# Be warned that these strings could be disabled in any new version of CVS.
UseNewInfoFmtStrings=yes
# This file affects handling of files based on their names.
#
# The -m option specifies whether CVS attempts to merge files.
#
# The -k option specifies keyword expansion (e.g. -kb for binary).
#
# Format of wrapper file ($CVSROOT/CVSROOT/cvswrappers or .cvswrappers)
#
# wildcard [option value][option value]...
#
# where option is one of
# -f from cvs filter value: path to filter
# -t to cvs filter value: path to filter
# -m update methodology value: MERGE or COPY
# -k expansion mode value: b, o, kkv, &c
#
# and value is a single-quote delimited value.
# For example:
#*.gif -k 'b'
# The "loginfo" file controls where "cvs commit" log information
# is sent. The first entry on a line is a regular expression which must match
# the directory that the change is being made to, relative to the
# $CVSROOT. If a match is found, then the remainder of the line is a filter
# program that should expect log information on its standard input.
#
# If the repository name does not match any of the regular expressions in this
# file, the "DEFAULT" line is used, if it is specified.
#
# If the name ALL appears as a regular expression it is always used
# in addition to the first matching regex or DEFAULT.
#
# If any format strings are present in the filter, they will be replaced as follows:
# %p = path relative to repository
# %r = repository (path portion of $CVSROOT)
# %{sVv} = attribute list = file name, old version number (pre-checkin),
# new version number (post-checkin). When either old or new revision is
# unknown, doesn't exist, or isn't applicable, the string "NONE" will be
# placed on the command line instead.
#
# Note that %{sVv} is a list operator and not all elements are necessary. Thus %{sv} is
# a legal format string, but will only be replaced with file name and new revision.
# it also generates multiple arguments for each file being operated upon. i.e. if two
# files, file1 & file2, are being commited from 1.1 to version 1.1.2.1 and from 1.1.2.2
# to 1.1.2.3, respectively, %{sVv} will generate the following six arguments in this
# order: file1, 1.1, 1.1.2.1, file2, 1.1.2.2, 1.1.2.3.
#
# For example:
#DEFAULT (echo ""; id; echo %s; date; cat) >> $CVSROOT/CVSROOT/commitlog
# or
#DEFAULT (echo ""; id; echo %{sVv}; date; cat) >> $CVSROOT/CVSROOT/commitlog
# Three different line formats are valid:
# key -a aliases...
# key [options] directory
# key [options] directory files...
#
# Where "options" are composed of:
# -i prog Run "prog" on "cvs commit" from top-level of module.
# -o prog Run "prog" on "cvs checkout" of module.
# -e prog Run "prog" on "cvs export" of module.
# -t prog Run "prog" on "cvs rtag" of module.
# -u prog Run "prog" on "cvs update" of module.
# -d dir Place module in directory "dir" instead of module name.
# -l Top-level directory only -- do not recurse.
#
# NOTE: If you change any of the "Run" options above, you'll have to
# release and re-checkout any working directories of these modules.
#
# And "directory" is a path to a directory relative to $CVSROOT.
#
# The "-a" option specifies an alias. An alias is interpreted as if
# everything on the right of the "-a" had been typed on the command line.
#
# You can encode a module within a module by using the special '&'
# character to interpose another module into the current module. This
# can be useful for creating a module that consists of many directories
# spread out over the entire source repository.
# The "notify" file controls where notifications from watches set by
# "cvs watch add" or "cvs edit" are sent. The first entry on a line is
# a regular expression which is tested against the directory that the
# change is being made to, relative to the $CVSROOT. If it matches,
# then the remainder of the line is a filter program that should contain
# one occurrence of %s for the user to notify, and information on its
# standard input.
#
# "ALL" or "DEFAULT" can be used in place of the regular expression.
#
# format strings are replaceed as follows:
# %p = path relative to repository
# %r = repository (path portion of $CVSROOT)
# %s = user to notify
#
# For example:
#ALL (echo Committed to %r/%p; cat) |mail %s -s "CVS notification"
# The "rcsinfo" file is used to control templates with which the editor
# is invoked on commit and import.
#
# The first entry on a line is a regular expression which is tested
# against the directory that the change is being made to, relative to the
# $CVSROOT. For the first match that is found, then the remainder of the
# line is the name of the file that contains the template.
#
# If the repository name does not match any of the regular expressions in this
# file, the "DEFAULT" line is used, if it is specified.
#
# If the name "ALL" appears as a regular expression it is always used
# in addition to the first matching regex or "DEFAULT".
# The "taginfo" file is used to control pre-tag checks.
# The filter on the right is invoked with the following arguments if no format strings are present:
#
# $1 -- tagname
# $2 -- operation "add" for tag, "mov" for tag -F, and "del" for tag -d
# $3 -- tagtype "?" on delete, "T" for branch, "N" for static
# $4 -- repository
# $5-> file revision [file revision ...]
#
# If any format strings are present in the filter, they will be replaced as follows:
# %b = branch mode = "?" (delete ops - unknown) | "T" (branch) | "N" (not branch)
# %o = operation = "add" | "mov" | "del"
# %p = path relative to repository
# %r = repository (path portion of $CVSROOT)
# %t = tagname
# %{sVv} = attribute list = file name, old version tag will be deleted from,
# new version tag will be added to (or deleted from, but this feature is
# deprecated. When either old or new revision is unknown, doesn't exist,
# or isn't applicable, the string "NONE" will be placed on the command
# line.
#
# Note that %{sVv} is a list operator and not all elements are necessary. Thus %{sV} is
# a legal format string, but will only be replaced with file name and old revision.
# it also generates multiple arguments for each file being operated upon. i.e. if two
# files, file1 & file2, are having a tag moved from version 1.1 to versoin 1.1.2.9, %{sVv}
# will generate the following six arguments in this order: file1, 1.1, 1.1.2.9, file2, 1.1,
# 1.1.2.9.
#
# A non-zero exit of the filter program will cause the tag to be aborted.
#
# The first entry on a line is a regular expression which is tested
# against the directory that the change is being committed to, relative
# to the $CVSROOT. For the first match that is found, then the remainder
# of the line is the name of the filter to run.
#
# If the repository name does not match any of the regular expressions in this
# file, the "DEFAULT" line is used, if it is specified.
#
# If the name "ALL" appears as a regular expression it is always used
# in addition to the first matching regex or "DEFAULT".
# The "verifymsg" file is used to allow verification of logging
# information. It works best when a template (as specified in the
# rcsinfo file) is provided for the logging procedure. Given a
# template with locations for, a bug-id number, a list of people who
# reviewed the code before it can be checked in, and an external
# process to catalog the differences that were code reviewed, the
# following test can be applied to the code:
#
# Making sure that the entered bug-id number is correct.
# Validating that the code that was reviewed is indeed the code being
# checked in (using the bug-id number or a seperate review
# number to identify this particular code set.).
#
# If any of the above test failed, then the commit would be aborted.
#
# Format strings present in the filter will be replaced as follows:
# %p = path relative to repository
# %r = repository (path portion of $CVSROOT)
# %l = name of log file to be verified.
#
# If no format strings are present in the filter, a default " %l" will
# be appended to the filter, but this usage is deprecated.
#
# Actions such as mailing a copy of the report to each reviewer are
# better handled by an entry in the loginfo file.
#
# One thing that should be noted is the the ALL keyword is not
# supported. There can be only one entry that matches a given
# repository.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
/*=============================================================================
* parser for CSP instances represented in XML format
*
* Copyright (c) 2008 Olivier ROUSSEL (olivier.roussel <at> cril.univ-artois.fr)
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*=============================================================================
*/
#ifndef _CSPParserCallback_h_
#define _CSPParserCallback_h_
#include <string>
#include "XMLParser_constants.h"
#include "AST.hh"
namespace CSPXMLParser
{
using namespace std;
enum CSPDefinitionType
{RelationType,PredicateType,GlobalConstraintType, // don't change these ones
DomainType,VariableType,ConstraintType,
UndefinedType}; // UndefinedType must come last
class AST; // Abstract Syntax Tree representing an expression
class CSPParserCallback
{
public:
virtual ~CSPParserCallback() {}
/**
* signal the beginning of parsing
*
* @param name: name of the instance
*/
virtual void beginInstance(const string & name) {}
/********************************************************************/
/**
* callback called at the beginning of the domains declarations
*
* @param nbDomains: number of domains that will be declared
*/
virtual void beginDomainsSection(int nbDomains) {}
/**
* callback called at the beginning of the declaration of one domain
*
* @param name: identifier of the domain
* @param idDomain: identifier assigned to the domain name (starting from 0)
* @param nbValue: number of values in the domain
*/
virtual void beginDomain(const string & name, int idDomain, int nbValue) {}
/**
* add a single value to the current domain
*
* @param v: value to add to the domain
*/
virtual void addDomainValue(int v) {}
/**
* add the range of values [first..last] to the current domain
*
* @param first: first value to add to the domain
* @param last: last value to add to the domain
*/
virtual void addDomainValue(int first,int last) {}
/**
* ends the definition of the current domain
*/
virtual void endDomain() {}
/**
* end the definition of all domains
*/
virtual void endDomainsSection() {}
/********************************************************************/
/**
* callback called at the beginning of the variables declarations
*
* @param nbVariables: number of variables that will be declared
*/
virtual void beginVariablesSection(int nbVariables) {}
/**
* callback called to define a new variable
*
* @param name: identifier of the variable
* @param idVar: identifier assigned to the variable name (starting from 0)
* @param domain: identifier of the variable domain
* @param idDomain: identifier assigned to the domain name (starting from 0)
*/
virtual void addVariable(const string & name, int idVar,
const string & domain, int idDomain) {}
/**
* end the definition of all variables
*/
virtual void endVariablesSection() {}
/********************************************************************/
/**
* callback called at the beginning of the relations declarations
*
* @param nbRelations: number of relations that will be declared
*/
virtual void beginRelationsSection(int nbRelations) {}
/**
* callback called at the beginning of the declaration of one relation
*
* @param name: identifier of the relation
* @param idRel: identifier assigned to the relation name (starting from 0)
* @param arity: arity of the relation
* @param nbTuples: number of tuples in the relation
* @param isSupport: true if tuples represent support, false if
* tuples represent conflicts
*/
virtual void beginRelation(const string & name, int idRel,
int arity, int nbTuples, RelType relType) {}
/**
* add a single tuple to the current relation
*
* @param arity: the tuple arity
* @param tuple: tuple to add to the relation (contains arity elements)
*/
virtual void addRelationTuple(int arity, int tuple[]) {}
/**
* add a single weighted tuple to the current relation
*
* @param arity: the tuple arity
* @param tuple: tuple to add to the relation (contains arity elements)
* @param cost: the cost of this tuple
*/
virtual void addRelationTuple(int arity, int tuple[], int cost) {}
/**
* ends the definition of the current relation
*/
virtual void endRelation() {}
/**
* end the definition of all relations
*/
virtual void endRelationsSection() {}
/********************************************************************/
/**
* callback called at the beginning of the predicates declarations
*
* @param nbPredicates: number of predicates that will be declared
*/
virtual void beginPredicatesSection(int nbPredicates) {}
/**
* callback called at the beginning of the declaration of one predicate
*
* @param name: identifier of the predicate
* @param idPred: identifier assigned to the predicate name (starting from 0)
*/
virtual void beginPredicate(const string & name, int idPred) {}
/**
* add a formal parameter to the current predicate
*
* @param pos: position of the formal parameter (0=first)
* @param name: name of the parameter
* @param type: type of the parameter
*/
virtual void addFormalParameter(int pos, const string & name, const string & type) {}
/**
* provide the expression of the current predicate
*
* @param tree: the abstract syntax tree representing the expression
*/
virtual void predicateExpression(AST *tree) {}
/**
* provide the expression of the current predicate
*
* @param expr: the string representing the expression
*/
virtual void predicateExpression(const string &expr) {}
/**
* ends the definition of the current predicate
*/
virtual void endPredicate() {}
/**
* end the definition of all predicates
*/
virtual void endPredicatesSection() {}
/********************************************************************/
/**
* callback called at the beginning of the constraints declarations
*
* @param nbConstraints: number of constraints that will be declared
*/
virtual void beginConstraintsSection(int nbConstraints) {}
/**
* callback called at the beginning of the declaration of one constraint
*
* @param name: identifier of the constraint
* @param idConstr: identifier assigned to the constraint name (starting from 0)
* @param arity: arity of the constraint
* @param name: the refererence to the definition of this constraint. May be a relation, a predicate or the name of a global constraint
* @param reference: the name of the relation/predicate or global constraint which defines the support/conflict tuples of this constraint
* @param type: type of reference (RelationType,PredicateType or
* GlobalConstraintType)
* @param id: identifier associated to the reference
*/
virtual void beginConstraint(const string & name, int idConstr,
int arity,
const string & reference,
CSPDefinitionType type, int id,
const ASTList &scope) {}
/**
* provides the list of parameters of the constraint
*
* @param args: the list of effective parameters of the constraint
*/
virtual void constraintParameters(const ASTList &args) {}
/**
* ends the definition of the current constraint
*/
virtual void endConstraint() {}
/**
* end the definition of all constraints
*/
virtual void endConstraintsSection() {}
/********************************************************************/
/**
* signal the end of parsing
*/
virtual void endInstance() {}
};
} // namespace
#endif
/*=============================================================================
* parser for CSP instances represented in XML format
*
* Copyright (c) 2008 Olivier ROUSSEL (olivier.roussel <at> cril.univ-artois.fr)
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*=============================================================================
*/
#ifndef _C_AST_h_
#define _C_AST_h_
#include "XMLParser_constants.h"
/**
*
* a simple representation of an Abstract Syntax Tree (AST) for C
*
*/
/*
* abtract node (the field type is present in every node of the
* tree). All other nodes in the tree "inherit" from this type.
*
* This is also the representation of a symbolic constant.
*/
typedef
struct
{
NodeType type;
} C_AST;
/*
* representation of a variable (necessarily a leaf in the tree)
*/
typedef
struct
{
NodeType type;
char *varName;
int idVar;
} C_AST_VarNode;
/*
* representation of a constant (boolean or integer -- necessarily a
* leaf in the tree)
*/
typedef
struct
{
NodeType type;
int val;
} C_AST_CstNode;
/*
* representation of a function
*/
typedef
struct
{
NodeType type;
int nbarg;
C_AST *args[];
} C_AST_FxNode;