view anagram/guisupport/gsinst.cpp @ 21:1c9dac05d040

Add lint-style FALLTHROUGH annotations to fallthrough cases. (in the parse engine and thus the output code) Document this, because the old output causes warnings with gcc10.
author David A. Holland
date Mon, 13 Jun 2022 00:04:38 -0400
parents 13d2b8934445
children
line wrap: on
line source

/*
 * AnaGram, A System for Syntax Directed Programming
 * Copyright 1997-1999 Parsifal Software. All Rights Reserved.
 * Copyright 2006 David A. Holland. All Rights Reserved.
 * See the file COPYING for license and usage terms.
 *
 * gsinst.cpp - template instantiation
 */

#include "agbaltree.h"
#include "agmap.h"
#include "agstring.h"
#include "data.h"
#include "mrule.h"
#include "sparse.h"

//struct HelpTopic; // from help.h

//#define INCLUDE_LOGGING
#include "log.h"


#include "agbaltree-imp.h"


#ifdef __IBMCPP__

//#pragma define(AgBalancedTree<AgMap<AgString, Log::Switch>::Wrapper>)
//#pragma define(AgBalancedTree<AgMap<AgString, HelpTopic *>::Wrapper>)
#pragma define(AgBalancedTree<MarkedRule>)
#pragma define(AgBalancedTree<Triple<int> >)
#pragma define(AgBalancedTree<OrderedPair<int> >)
#pragma define(AgBalancedTree<AgArray<int> >)
#pragma define(AgBalancedTree<AgSparseIntArray::Pair>)

#endif


#ifdef __BCPLUSPLUS__
#pragma option -Jgd

typedef AgBalancedTree<AgMap<AgString, Log::Switch>::Wrapper> fake1;
typedef AgBalancedTree<AgMap<AgString, Log::Switch>::Wrapper> fake2;
//typedef AgBalancedTree<IntegerPair>                         fake3;
typedef AgBalancedTree<MarkedRule>                            fake4;
typedef AgBalancedTree<Triple<int> >                          fake5;
typedef AgBalancedTree<OrderedPair<int> >                     fake8;
typedef AgBalancedTree<AgArray<int> >                         fake6a;
typedef AgBalancedTree<AgSparseIntArray::Pair>                fake7;

#endif


#ifdef __WATCOM_CPLUSPLUS__

typedef AgBalancedTree<AgMap<AgString, Log::Switch>::Wrapper> abtjunk1;
//typedef AgBalancedTree<IntegerPair>                         abtjunk2;
typedef AgBalancedTree<MarkedRule>                            abtjunk3;
typedef AgBalancedTree<Triple<int> >                          abtjunk4;
typedef AgBalancedTree<OrderedPair<int> >                     fake8;
typedef AgBalancedTree<AgArray<int> >                         abtjunk5a;
typedef AgBalancedTree<AgSparseIntArray::Pair>                fake7;

#endif


#ifdef _MSC_VER

template class AgBalancedTree<AgMap<AgString, Log::Switch>::Wrapper>;
//template class AgBalancedTree<IntegerPair>;
template class AgBalancedTree<MarkedRule>;
template class AgBalancedTree<Triple<int> >;
template class AgBalancedTree<OrderedPair<int> >;
template class AgBalancedTree<AgArray<int> >;
template class AgBalancedTree<AgSparseIntArray::Pair>;

#endif


#ifdef __GNUC__

template class AgIndexedContainer<AgArray<int> >;
//template class AgBalancedTree<AgMap<AgString, Log::Switch>::Wrapper>;
//template class AgBalancedTree<IntegerPair>;
template class AgBalancedTree<MarkedRule>;
template class AgBalancedTree<AgSparseIntArray::Pair>;

#endif