using CanonSharp.Combinator.Abstractions; using CanonSharp.Pascal.Scanner; using static CanonSharp.Combinator.ParserBuilder; namespace CanonSharp.Pascal.Parser; public abstract class GrammarParserBuilder { protected static IParser Keyword(string value) => Satisfy(token => token.TokenType == LexicalTokenType.Keyword && token.LiteralValue == value); protected static IParser Operator(string value) => Satisfy(token => token.TokenType == LexicalTokenType.Operator && token.LiteralValue == value); protected static IParser Delimiter(string value) => Satisfy(token => token.TokenType == LexicalTokenType.Delimiter && token.LiteralValue == value); }