26 lines
648 B
C#
26 lines
648 B
C#
namespace Parsing.Schema;
|
|
|
|
using Parsing.Schema;
|
|
using Parsing.Schema.BuildingBlocks;
|
|
using Parsing.Tokenization;
|
|
using System.Collections;
|
|
|
|
public interface ISchemaContext
|
|
{
|
|
public int lastProcessedBlockIndex { get; set; }
|
|
public bool HasFinished { get; set; }
|
|
}
|
|
|
|
public interface ISchema<T> where T : ISchemaContext
|
|
{
|
|
public List<IToken> ProcessNextWord(T currentContext, InputProvider inputs);
|
|
|
|
public bool CanProcessNextWord(T currentContext, InputProvider inputs);
|
|
|
|
public bool CanProcessNextWord(T currentContext, string word);
|
|
|
|
public List<IToken> ProcessWordList(string[] words);
|
|
|
|
public T CreateContext();
|
|
}
|