⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 unit1.h

📁 利用字符二维数组对文法、First集、Follow集、终结符集、非终结符集等数据进行存储
💻 H
字号:
//---------------------------------------------------------------------------

#ifndef Unit1H
#define Unit1H
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <ExtCtrls.hpp>
#include <Menus.hpp>
#include <ComCtrls.hpp>
#include <Grids.hpp>
#include <ImgList.hpp>
#include <Buttons.hpp>
//---------------------------------------------------------------------------
class TForm1 : public TForm
{
__published:	// IDE-managed Components
        TPanel *Panel1;
        TMainMenu *MainMenu1;
        TMenuItem *N1;
        TMenuItem *N2;
        TStringGrid *SLRGrid;
        TComboBoxEx *ComboBoxEx1;
        TImageList *ImageList1;
        TLabel *Label1;
        TMemo *Memo1;
        TLabel *Label2;
        TComboBoxEx *ComboBoxEx2;
        TLabel *Label3;
        TImageList *ImageList2;
        TBitBtn *BitBtn1;
        TImage *Image1;
        TListBox *ListBox1;
        TButton *Button1;
        TLabel *Label4;
        TStaticText *StaticText1;
        void __fastcall N2Click(TObject *Sender);
        void __fastcall ComboBoxEx1Change(TObject *Sender);
        void __fastcall ComboBoxEx2Change(TObject *Sender);
        void __fastcall BitBtn1Click(TObject *Sender);
        void __fastcall Button1Click(TObject *Sender);
private:	// User declarations
public:		// User declarations
        char first[100][100],follow[100][100];
        char SetT[100],SetN[100];
        int DA[100][100];//状态集合
        char TAB[100][100];//状态转换表
        int N;//生成的状态数
        int K;//扫描到的状态
        int SetTnum,SetNnum;
        char token[100];//分析表第一行的终结符和非终结符
        char P[100][100];//文法
        int Pnum;//文法条数
        int table[100][100];
        int X;
        int Y;
        __fastcall TForm1(TComponent* Owner);
        void DrawDFA(int start, int end, char token, TImage * image);
        void DFA(void);
        void FirstS(void);
        void FollowS(void);
        void DFACon(void);
        void IntProduction(void);
        void ConNandTSet(void);
};
//---------------------------------------------------------------------------
extern PACKAGE TForm1 *Form1;
//---------------------------------------------------------------------------
#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -