src/Lexer.h

changeset 110
7a7a53f1d51b
parent 108
6409ece8297c
child 112
def56932f938
--- a/src/Lexer.h	Wed Feb 12 06:33:16 2014 +0200
+++ b/src/Lexer.h	Wed Feb 12 06:50:13 2014 +0200
@@ -37,7 +37,7 @@
 types:
 	struct Token
 	{
-		EToken		type;
+		TokenType	type;
 		String		text;
 		String		file;
 		int			line;
@@ -52,13 +52,13 @@
 	~Lexer();
 
 	void	ProcessFile (String file_name);
-	bool	GetNext (EToken req = tkAny);
-	void	MustGetNext (EToken tok);
-	void	MustGetAnyOf (const List<EToken>& toks);
-	int		GEXPRSYM_tOne (const StringList& syms);
-	void	TokenMustBe (EToken tok);
+	bool	GetNext (TokenType req = TK_Any);
+	void	MustGetNext (TokenType tok);
+	void	MustGetAnyOf (const List<TokenType>& toks);
+	int		GetOneSymbol (const StringList& syms);
+	void	TokenMustBe (TokenType tok);
 	bool	PeekNext (Token* tk = null);
-	bool	PeekNextType (EToken req);
+	bool	PeekNextType (TokenType req);
 	String	PeekNextString (int a = 1);
 	String	DescribeCurrentPosition();
 	String	DescribeTokenPosition();
@@ -81,7 +81,7 @@
 		return mTokenPosition == mTokens.end();
 	}
 
-	inline EToken GetTokenType() const
+	inline TokenType GetTokenType() const
 	{
 		return GetToken()->type;
 	}
@@ -102,7 +102,7 @@
 	}
 
 	// If @tok is given, describes the token. If not, describes @tok_type.
-	static inline String DescribeTokenType (EToken toktype)
+	static inline String DescribeTokenType (TokenType toktype)
 	{
 		return DescribeTokenPrivate (toktype, null);
 	}
@@ -117,10 +117,10 @@
 	Iterator		mTokenPosition;
 
 	// read a mandatory token from scanner
-	void MustGetFromScanner (LexerScanner& sc, EToken tt = tkAny);
+	void MustGetFromScanner (LexerScanner& sc, TokenType tt =TK_Any);
 	void CheckFileHeader (LexerScanner& sc);
 
-	static String DescribeTokenPrivate (EToken tok_type, Token* tok);
+	static String DescribeTokenPrivate (TokenType tok_type, Token* tok);
 };
 
 #endif // BOTC_LEXER_H

mercurial