| | |
| | | {
|
| | | public string Id { get; set; }
|
| | |
|
| | | public bool SkipLeadingWhitespace { get; set; }
|
| | | public RegExpr LeadingWhitespace { get; set; }
|
| | | private bool SkipLeadingWhitespace { get; }
|
| | | private RegExpr LeadingWhitespace { get; }
|
| | |
|
| | | public RegExpr Expr { get; set; }
|
| | | private RegExpr Expr { get; }
|
| | |
|
| | | public HashSet<Token> Children { get; set; }
|
| | | public Dictionary<string, Token> Parents { get; set; }
|
| | | private HashSet<Token> Children { get; }
|
| | | public Dictionary<string, Token> Parents { get; }
|
| | | public IEnumerable<string> CaptureIds => Parents.Keys;
|
| | |
|
| | | public Token(string id, RegExpr skipWs, RegExpr expr)
|
| | |
| | | /// <summary>
|
| | | /// Set of rules that can be applied to the token.
|
| | | /// </summary>
|
| | | TokenRules Rules { get; set; }
|
| | | TokenRules Rules { get; }
|
| | |
|
| | | public void Add(IProductionRule rule)
|
| | | {
|
| | |
| | |
|
| | | public class TokenGroup : IEnumerable<string>
|
| | | {
|
| | | HashSet<string> TokenIds { get; set; }
|
| | | HashSet<string> TokenIds { get; }
|
| | |
|
| | | public TokenGroup(params string[] tokenIds)
|
| | | {
|
| | |
| | |
|
| | | public class TokenRules : IEnumerable<IProductionRule>
|
| | | {
|
| | | Dictionary<RuleCallback.Selector, IProductionRule> Rules { get; set; }
|
| | | Dictionary<RuleCallback.Selector, IProductionRule> Rules { get; }
|
| | | IProductionRule DefaultRule { get; set; }
|
| | |
|
| | | public TokenRules()
|
| | |
| | | public object Production { get; }
|
| | | }
|
| | |
|
| | | static TokenEndOfList EndOfList = new TokenEndOfList();
|
| | | static readonly TokenEndOfList EndOfList = new TokenEndOfList();
|
| | | }
|
| | | }
|