1 /******************************************************************************
3 * $Id: vhdlscanner.h,v 1.9 2001/03/19 19:27:39 root Exp $
5 * Copyright (C) 1997-2012 by Dimitri van Heesch.
7 * Permission to use, copy, modify, and distribute this software and its
8 * documentation under the terms of the GNU General Public License is hereby
9 * granted. No representations are made about the suitability of this software
10 * for any purpose. It is provided "as is" without express or implied warranty.
11 * See the GNU General Public License for more details.
13 * Documents produced by Doxygen are derivative works derived from the
14 * input used in their production; they are not affected by this license.
21 #include "parserintf.h"
33 #include "memberlist.h"
43 /** VHDL parser using state-based lexical scanning.
45 * This is the VHDL language parser for doxygen.
47 class VHDLLanguageScanner : public ParserInterface
50 virtual ~VHDLLanguageScanner() {}
51 void parseInput(const char * fileName,
54 bool needsPreprocessing(const QCString &extension);
55 void parseCode(CodeOutputInterface &codeOutIntf,
56 const char *scopeName,
57 const QCString &input,
59 const char *exampleName=0,
63 bool inlineFragment=FALSE,
64 MemberDef *memberDef=0,
65 bool showLineNumbers=TRUE,
66 Definition *searchCtx=0
68 void resetCodeParserState();
69 void parsePrototype(const char *text);
72 /** Container for vhdlscanner */
75 int yyLineNr; // current line no
76 int iLine; // line no of last t_identifier
77 QCString qstr; // t_identifier
78 QCString fileName; // current file
82 /** Configuation node for VHDL */
85 VhdlConfNode *prevNode;
86 VhdlConfNode(const char* a,const char* b,const char* config)
88 arch=a; // architecture e.g. for iobuffer
89 binding=b; // binding e.g. use entiy work.xxx(bev)
90 confVhdl=config; // configuration foo is bar
94 isInlineConf=false; // primary configuration?
100 QList<VhdlConfNode> confN;
105 void addNode(VhdlConfNode* n) { confN.append(n); }
106 bool isBinding() { return binding.isEmpty(); }
109 // returns the current conpound entity,architecture, package,package body
110 Entry* getVhdlCompound();
112 // return the current parsed entry
113 Entry* getCurrentVhdlEntry();
117 void initVhdlParser();
119 struct VhdlContainer* getVhdlCont();
121 // returns the parsed line
122 // @ param object index of vhdl keyword like t_Identifier t_Entity
123 int getParsedLine(int object);
125 void vhdlscanFreeScanner();
129 // return the list of component instantiations e.g. foo: component bar
130 QList<Entry> & getVhdlInstList();
132 // returns the list of found configurations
133 QList<VhdlConfNode>& getVhdlConfiguration();
135 void isVhdlDocPending();