Canon/Canon.Core/Enums/SemanticEnums.cs
jackfiled 6130adfa7c feat: 按照open_set中的示例调整语法 (#71)
添加了构建LR分析表冲突的报错

Reviewed-on: PostGuard/Canon#71
2024-05-01 21:06:27 +08:00

104 lines
1.3 KiB
C#

namespace Canon.Core.Enums;
public enum SemanticTokenType
{
Keyword,
Number,
Operator,
Delimiter,
Identifier,
Character,
Empty,
/// <summary>
/// 语法分析中的栈底符号
/// </summary>
End
}
public enum DelimiterType
{
Comma,
Period,
Colon,
Semicolon,
LeftParenthesis,
RightParenthesis,
LeftSquareBracket,
RightSquareBracket,
SingleQuotation,
DoubleQuotation,
/// <summary>
/// 访问记录字段用的点 x.a
/// </summary>
Dot,
/// <summary>
/// 数组声明上下界之间的分隔符 1..50
/// </summary>
DoubleDots
}
public enum KeywordType
{
Program,
Const,
Var,
Procedure,
Function,
Begin,
End,
Array,
Of,
If,
Then,
Else,
For,
To,
Do,
Integer,
Real,
Boolean,
Character,
Divide,
Not,
Mod,
And,
Or,
True,
False
}
public enum OperatorType
{
Equal,
NotEqual,
Less,
LessEqual,
Greater,
GreaterEqual,
Plus,
Minus,
Multiply,
Divide,
Assign
}
public enum NumberType
{
Integer,
Real,
Hex
}
public enum StateType
{
Start,
Comment,
Word,
Num,
Delimiter,
Operator,
BreakPoint,
Unknown,
Done
}