2 using System.Collections.Generic;
12 public QuotedValueLiteral(
string name,
string startEndSymbol, TypeCode dataType) : this(name, startEndSymbol, startEndSymbol, dataType) {}
14 public QuotedValueLiteral(
string name,
string startSymbol,
string endSymbol, TypeCode dataType) : base(name, dataType) {
15 StartSymbol = startSymbol;
16 EndSymbol = endSymbol;
20 return new string[] {StartSymbol};
24 var start = source.Location.Position + StartSymbol.Length;
25 var end = source.Text.IndexOf(EndSymbol, start);
26 if (end < 0)
return null;
27 var body = source.Text.Substring(start, end - start);
28 source.PreviewPosition = end + EndSymbol.Length;
override string ReadBody(ParsingContext context, ISourceStream source)
Interface for Terminals to access the source stream and produce tokens.
readonly bool CaseSensitive
Gets case sensitivity of the grammar. Read-only, true by default. Can be set to false only through a ...
QuotedValueLiteral(string name, string startEndSymbol, TypeCode dataType)
override IList< string > GetFirsts()
bool MatchSymbol(string symbol, bool ignoreCase)
Tries to match the symbol with the text at current preview position.
QuotedValueLiteral(string name, string startSymbol, string endSymbol, TypeCode dataType)