2012-04-13 01:08:20 +00:00
|
|
|
// -*- mode: C++; c-file-style: "cc-mode" -*-
|
2006-08-26 11:35:28 +00:00
|
|
|
//*************************************************************************
|
|
|
|
// DESCRIPTION: Verilator: Preprocessing wrapper program
|
|
|
|
//
|
2019-11-08 03:33:59 +00:00
|
|
|
// Code available from: https://verilator.org
|
2006-08-26 11:35:28 +00:00
|
|
|
//
|
|
|
|
//*************************************************************************
|
|
|
|
//
|
2023-01-01 15:18:39 +00:00
|
|
|
// Copyright 2004-2023 by Wilson Snyder. This program is free software; you
|
2020-03-21 15:24:24 +00:00
|
|
|
// can redistribute it and/or modify it under the terms of either the GNU
|
2009-05-04 21:07:57 +00:00
|
|
|
// Lesser General Public License Version 3 or the Perl Artistic License
|
|
|
|
// Version 2.0.
|
2020-03-21 15:24:24 +00:00
|
|
|
// SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
2006-08-26 11:35:28 +00:00
|
|
|
//
|
|
|
|
//*************************************************************************
|
2019-10-05 00:17:11 +00:00
|
|
|
|
2021-03-04 02:57:07 +00:00
|
|
|
#ifndef VERILATOR_V3PRESHELL_H_
|
|
|
|
#define VERILATOR_V3PRESHELL_H_
|
2006-08-26 11:35:28 +00:00
|
|
|
|
2006-12-18 19:20:45 +00:00
|
|
|
#include "config_build.h"
|
|
|
|
#include "verilatedos.h"
|
2018-10-14 17:43:24 +00:00
|
|
|
|
2006-08-26 11:35:28 +00:00
|
|
|
#include "V3Error.h"
|
2014-11-22 16:48:39 +00:00
|
|
|
#include "V3FileLine.h"
|
2006-08-26 11:35:28 +00:00
|
|
|
|
2009-10-31 14:08:38 +00:00
|
|
|
class V3ParseImp;
|
2019-10-05 11:54:14 +00:00
|
|
|
class VInFilter;
|
2019-07-14 00:30:32 +00:00
|
|
|
class VSpellCheck;
|
2008-01-31 14:49:27 +00:00
|
|
|
|
2006-08-26 11:35:28 +00:00
|
|
|
//============================================================================
|
|
|
|
|
2020-11-19 02:32:16 +00:00
|
|
|
class V3PreShell final {
|
2006-08-26 11:35:28 +00:00
|
|
|
// Static class for calling preprocessor
|
|
|
|
public:
|
2022-07-13 17:24:48 +00:00
|
|
|
static void boot();
|
2023-01-01 14:22:13 +00:00
|
|
|
static void shutdown();
|
2019-10-05 11:54:14 +00:00
|
|
|
static bool preproc(FileLine* fl, const string& modname, VInFilter* filterp,
|
2018-10-14 22:39:33 +00:00
|
|
|
V3ParseImp* parsep, const string& errmsg);
|
|
|
|
static void preprocInclude(FileLine* fl, const string& modname);
|
2009-12-21 03:26:48 +00:00
|
|
|
static void defineCmdLine(const string& name, const string& value);
|
2006-08-26 11:35:28 +00:00
|
|
|
static void undef(const string& name);
|
2018-10-25 23:45:06 +00:00
|
|
|
static void dumpDefines(std::ostream& os);
|
2019-07-14 00:30:32 +00:00
|
|
|
static void candidateDefines(VSpellCheck* spellerp);
|
2006-08-26 11:35:28 +00:00
|
|
|
};
|
|
|
|
|
2019-05-19 20:13:13 +00:00
|
|
|
#endif // Guard
|