using Canon.Core.GrammarParser;
namespace Canon.Core.Abstractions;
///
/// 进行归约需要的信息
///
/// 归约的长度
/// 归约得到的左部符号
public record ReduceInformation(int Length, NonTerminator Left)
{
public string GenerateCode()
{
return $"new ReduceInformation({Length}, {Left.GenerateCode()})";
}
}
///
/// 状态的各种迁移信息
///
public interface ITransformer
{
public string Name { get; }
///
/// 进行移进的信息
///
public IDictionary ShiftTable { get; }
///
/// 进行归约的信息
///
public IDictionary ReduceTable { get; }
}