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

📄 javaparse_1.h

📁 用bcg库编写的java IDE 源码
💻 H
字号:
// JavaParse_1.h: interface for the CJavaParse_1 class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_JAVAPARSE_1_H__219F4C07_15A1_4EDA_B259_E5A7CC393C99__INCLUDED_)
#define AFX_JAVAPARSE_1_H__219F4C07_15A1_4EDA_B259_E5A7CC393C99__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

//#include "ptrStack.h"
#include "JavaDeclManager.h"
//class CJavaDeclManager;
#include <iostream>
using namespace std;
template <typename StackType>
class genStack;

class CJavaParse_1  
{
	struct __state__{
      int line;
	  int index;
	  string token;
	  __state__(int l,int i, string s)
	  {
        line = l; index = i; token = s;
	  }
       __state__()
	   {

	   }
	};

	genStack<__state__> m_stStates;

    string  m_strCurToken;
	LPCTSTR m_lszpLine;

	int     m_nLineLength;
    int     m_nCharIndex;
    int     m_nLineIndex;
	int     m_nStartIndex;
	int     m_nStartLine;
	

	CJavaDeclManager* m_pDeclManager;
public:
	CJavaParse_1();
	virtual ~CJavaParse_1();
    
protected:
	bool getNextToken();
	bool getNextLine();

	bool package_statement();
	bool import_statement();
	bool type_declaration();
	bool doc_comment();
	bool class_declaration();
	bool interface_declaration();
	bool field_declaration();
	bool method_declaration();
	bool constructor_declaration();
	bool statement_block();
	bool variable_declaration();
	bool variable_declarator();
	bool variable_initializer();
	bool static_initializer();
	bool parameter_list();
	bool parameter();
	bool statement();
	bool if_statement();
	bool do_statement();
	bool while_statement();
	bool for_statement();
	bool try_statement();
	bool switch_statement();
	bool expression();
	bool numeric_expression();
	bool testing_expression();
	bool logical_expression();
	bool string_expression();
	bool bit_expression();
	bool casting_expression();
	bool creating_expression();
	bool literal_expression();
	bool arglist();
	bool type();
	bool type_specifier();
	bool modifier();
	bool package_name();
	bool class_name();
	bool interface_name();
	bool integer_literal();
	bool float_literal();
	bool decimal_digit();
	bool exponent_part();
	bool float_type_suffix();
	bool character();
	bool string();
	bool identifier();
	
	void saveState();
	void resetState();
	void popStack();
};

#endif // !defined(AFX_JAVAPARSE_1_H__219F4C07_15A1_4EDA_B259_E5A7CC393C99__INCLUDED_)

⌨️ 快捷键说明

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