14 using System.Collections.Generic;
25 base.SetFlag(TermFlags.IsConstant);
26 AstNodeType = nodeType;
29 public void Add(
string lexeme,
object value) {
30 this.Constants[lexeme] = value;
34 base.Init(grammarData);
35 if (this.EditorInfo == null)
40 string text = source.Text;
42 var constant = entry.Key;
43 if (source.PreviewPosition + constant.Length > text.Length)
continue;
45 source.PreviewPosition += constant.Length;
46 return source.CreateToken(this.OutputTerminal, entry.Value);
52 string[] array =
new string[Constants.Count];
53 Constants.Keys.CopyTo(array, 0);
override Token TryMatch(ParsingContext context, ISourceStream source)
ConstantTerminal(string name, Type nodeType)
override void Init(GrammarData grammarData)
global::MonoTouch.Constants Constants
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 ...
void Add(string lexeme, object value)
Tokens are produced by scanner and fed to parser, optionally passing through Token filters in between...
override IList< string > GetFirsts()