public void RegisterBracePair(string openBrace, string closeBrace) { KeyTerm openS = ToTerm(openBrace); KeyTerm closeS = ToTerm(closeBrace); openS.SetFlag(TermFlags.IsOpenBrace); openS.IsPairFor = closeS; closeS.SetFlag(TermFlags.IsCloseBrace); closeS.IsPairFor = openS; }
public void MarkPunctuation(params string[] symbols) { foreach (string symbol in symbols) { KeyTerm term = ToTerm(symbol); term.SetFlag(TermFlags.IsPunctuation | TermFlags.NoAstNode); } }
public void RegisterOperators(int precedence, Associativity associativity, params string[] opSymbols) { foreach (string op in opSymbols) { KeyTerm opSymbol = ToTerm(op); opSymbol.SetFlag(TermFlags.IsOperator); opSymbol.Precedence = precedence; opSymbol.Associativity = associativity; } }//method