public static bool IsBigOperator(this TexSymbolKind symbol) { switch (symbol) { case TexSymbolKind.Sum: case TexSymbolKind.Product: case TexSymbolKind.Coproduct: case TexSymbolKind.Integral: case TexSymbolKind.DoubleIntegral: case TexSymbolKind.TripleIntegral: case TexSymbolKind.QuadrupleIntegral: case TexSymbolKind.NtupleIntegral: case TexSymbolKind.ClosedIntegral: case TexSymbolKind.ClosedDoubleIntegral: case TexSymbolKind.ClosedTripleIntegral: case TexSymbolKind.ClosedQuadrupleIntegral: case TexSymbolKind.ClosedNtupleIntegral: case TexSymbolKind.BigOPlus: case TexSymbolKind.BigOTimes: case TexSymbolKind.BigODot: case TexSymbolKind.BigCup: case TexSymbolKind.BigCap: case TexSymbolKind.BigCupPlus: case TexSymbolKind.BigSquareCup: case TexSymbolKind.BigSquareCap: case TexSymbolKind.BigVee: case TexSymbolKind.BigWedge: return(true); default: return(false); } }
public TexExpressionNode(TexSymbolKind symbol, object value) : this() { this.Symbol = symbol; this.Value = value; this.Children = new TexExpressionNodeCollection(this); this.Arguments = new TexExpressionNodeCollection(this); }
private TexToken(TexSymbolKind symbol, object value, int sourcePosition, string sourceText) { this.Symbol = symbol; this.Value = value; this.sourcePosition = sourcePosition; this.sourceText = sourceText; }
public TexExpressionNode(TexSymbolKind symbol, IEnumerable <TexExpressionNode> children) : this(symbol) { foreach (var childNode in children) { this.Children.Add(childNode); } }
public static bool IsPostfixOperator(this TexSymbolKind symbol) { switch (symbol) { case TexSymbolKind.Factorial: return(true); default: return(false); } }
public static bool IsRaiseOrLowerOperator(this TexSymbolKind symbol) { switch (symbol) { case TexSymbolKind.RaiseToIndex: case TexSymbolKind.LowerToIndex: return(true); default: return(false); } }
public static bool IsBracketedFunction(this TexSymbolKind symbol) { switch (symbol) { case TexSymbolKind.Fraction: case TexSymbolKind.Binomial: case TexSymbolKind.Root: return(true); default: return(false); } }
public static bool IsRelationOperator(this TexSymbolKind symbol) { switch (symbol) { case TexSymbolKind.Equals: case TexSymbolKind.NotEquals: case TexSymbolKind.DotEquals: case TexSymbolKind.Approximates: case TexSymbolKind.Equivalent: case TexSymbolKind.LessThan: case TexSymbolKind.LessThanOrEqualTo: case TexSymbolKind.GreaterThan: case TexSymbolKind.GreaterThanOrEqualTo: case TexSymbolKind.MuchLessThan: case TexSymbolKind.MuchGreaterThan: case TexSymbolKind.Proportional: case TexSymbolKind.Asymptotic: case TexSymbolKind.Bowtie: case TexSymbolKind.Models: case TexSymbolKind.Precedes: case TexSymbolKind.PrecedesOrEquals: case TexSymbolKind.Succedes: case TexSymbolKind.SuccedesOrEquals: case TexSymbolKind.Congruent: case TexSymbolKind.Similar: case TexSymbolKind.SimilarOrEquals: case TexSymbolKind.Perpendicular: case TexSymbolKind.Parallel: case TexSymbolKind.Middle: case TexSymbolKind.Subset: case TexSymbolKind.SubsetOrEqualTo: case TexSymbolKind.Superset: case TexSymbolKind.SupersetOrEqualTo: case TexSymbolKind.SquareSubset: case TexSymbolKind.SquareSubsetOrEqualTo: case TexSymbolKind.SquareSuperset: case TexSymbolKind.SquareSupersetOrEqualTo: case TexSymbolKind.Member: case TexSymbolKind.NotMember: case TexSymbolKind.Contains: case TexSymbolKind.NotContains: case TexSymbolKind.Smile: case TexSymbolKind.Frown: case TexSymbolKind.VLineDash: case TexSymbolKind.DashVLine: return(true); default: return(false); } }
public static bool IsPlusOrMinusOperator(this TexSymbolKind symbol) { switch (symbol) { case TexSymbolKind.Plus: case TexSymbolKind.Minus: case TexSymbolKind.PlusMinus: case TexSymbolKind.MinusPlus: return(true); default: return(false); } }
public static bool IsValue(this TexSymbolKind symbol) { switch (symbol) { case TexSymbolKind.Number: case TexSymbolKind.Letter: case TexSymbolKind.GreekLetter: case TexSymbolKind.Text: return(true); default: return(false); } }
public static bool IsFormatting(this TexSymbolKind symbol) { switch (symbol) { case TexSymbolKind.Space: case TexSymbolKind.Separator: case TexSymbolKind.Left: case TexSymbolKind.Right: return(true); default: return(false); } }
public static bool IsLongOperator(this TexSymbolKind symbol) { switch (symbol) { case TexSymbolKind.Dot: case TexSymbolKind.InlineModulo: case TexSymbolKind.Over: return(true); default: if (IsRelationOperator(symbol)) { return(true); } return(false); } }
public static bool IsFunctionOperator(this TexSymbolKind symbol) { switch (symbol) { case TexSymbolKind.Minimum: case TexSymbolKind.Maximum: case TexSymbolKind.GreatestCommonDenominator: case TexSymbolKind.LowestCommonMultiple: case TexSymbolKind.Exponent: case TexSymbolKind.Log: case TexSymbolKind.NaturalLog: case TexSymbolKind.Argument: case TexSymbolKind.Limit: case TexSymbolKind.LimitInferior: case TexSymbolKind.LimitSuperior: case TexSymbolKind.Sine: case TexSymbolKind.Cosine: case TexSymbolKind.Tangent: case TexSymbolKind.Cosecant: case TexSymbolKind.Secant: case TexSymbolKind.Cotangent: case TexSymbolKind.ArcSine: case TexSymbolKind.ArcCosine: case TexSymbolKind.ArcTangent: case TexSymbolKind.ArcCosecant: case TexSymbolKind.ArcSecant: case TexSymbolKind.ArcCotangent: case TexSymbolKind.HypSine: case TexSymbolKind.HypCosine: case TexSymbolKind.HypTangent: case TexSymbolKind.HypCosecant: case TexSymbolKind.HypSecant: case TexSymbolKind.HypCotangent: case TexSymbolKind.ArHypSine: case TexSymbolKind.ArHypCosine: case TexSymbolKind.ArHypTangent: case TexSymbolKind.ArHypCosecant: case TexSymbolKind.ArHypSecant: case TexSymbolKind.ArHypCotangent: return(true); default: return(false); } }
public static bool IsLeftAssociativeOperator(this TexSymbolKind symbol) { switch (symbol) { case TexSymbolKind.Minus: case TexSymbolKind.PlusMinus: case TexSymbolKind.MinusPlus: case TexSymbolKind.Divide: case TexSymbolKind.Over: case TexSymbolKind.Fraction: case TexSymbolKind.InlineModulo: case TexSymbolKind.RaiseToIndex: case TexSymbolKind.LowerToIndex: return(true); default: return(false); } }
public static bool IsCloseBracket(this TexSymbolKind symbol) { switch (symbol) { case TexSymbolKind.GroupClose: return(true); case TexSymbolKind.RoundBracketClose: return(true); case TexSymbolKind.SquareBracketClose: return(true); case TexSymbolKind.ModulusBracket: return(true); default: return(false); } }
public static bool IsBinaryOperator(this TexSymbolKind symbol) { switch (symbol) { case TexSymbolKind.Plus: case TexSymbolKind.Minus: case TexSymbolKind.PlusMinus: case TexSymbolKind.MinusPlus: case TexSymbolKind.Cross: case TexSymbolKind.Dot: case TexSymbolKind.Star: case TexSymbolKind.Divide: case TexSymbolKind.Over: case TexSymbolKind.InlineModulo: case TexSymbolKind.RaiseToIndex: case TexSymbolKind.LowerToIndex: return(true); default: return(false); } }
public static bool IsBracket(this TexSymbolKind symbol) { return(IsOpenBracket(symbol) || IsCloseBracket(symbol)); }
private TexToken(TexSymbolKind symbol, int sourcePosition, string sourceText) : this(symbol, null, sourcePosition, sourceText) { }
private TexToken(TexSymbolKind symbol, object value) : this(symbol, value, -1, null) { }
private TexToken(TexSymbolKind symbol) : this(symbol, -1, null) { }
public static TexToken FromValue(TexSymbolKind kind, object value, int sourcePosition, string sourceText) { return(new TexToken(kind, value, sourcePosition, sourceText)); }
public static TexToken FromValue(TexSymbolKind kind, object value) { return(new TexToken(kind, value)); }
public static TexToken FromSymbol(TexSymbolKind symbol, int sourcePosition, string sourceText) { return(new TexToken(symbol, sourcePosition, sourceText)); }
public static TexToken FromSymbol(TexSymbolKind symbol) { return(new TexToken(symbol)); }
public TexExpressionNode(TexSymbolKind symbol) : this() { this.Symbol = symbol; this.Value = null; }
public static bool IsLtrInfixOperator(this TexSymbolKind symbol) { return(IsBinaryOperator(symbol)); }