Math.NET Documentation - Free & Open Mathematics for .NET

Math.NET
RSS

Navigation




Quick Search
»
Advanced Search »

Math.NET Project


Wiki

New Admin Files Login Profile

PoweredBy
This is an early suggestion for a possible parser grammar to be implemented in Palladium.

Notation

  • a|b: exclusive or; either a or b, but not both
  • a, b: concatenation; first a, then b (both required)
  • (...)?: optional; zero or one time
  • (...)+: one or more times
  • (...)*: optional; zero, one or more times

Terminal Values - Leaf Nodes

Numbers

Nonterminal= RuleExamples
digit10_withoutZero="1"|"2"|"3"|"4"|"5"|"6"|"7"|"8"|"9"1, 3, 5
digit10="0"|digit10_withoutZero0, 1, 4
natural=digit10_withoutZero, digit_10*3402, 1, 230
number="0"|natural0, 1, 12304
integer=number|( ("+"|"-"), natural )0, 14, -305
real=integer, (".", number)?, ("e", ("+"|"-")?, number)?15, 104.35, -35.12e-45

Names (for variables, functions, ...)

Nonterminal= RuleExamples
char="a"|"b"|"c" ... "x"|"y"|"z"b, m, z
charExtended=char|digit10|"_"b, 4, _
name=char, charExtended*b, a5_d, zz78
variable=name

Expressions - Composite Nodes

Nonterminal= Rule
additive=("+"|"-")?, multiplicative, (("+"|"-"), multiplicative)*
multiplicative=power, (("*"|"/"), power)*
power=factorial, ("^", factorial)*
factorial=terminal, "!"?
terminal=real|variable|(name, "(", expression, ")")|("(", expression, ")")
expression=additive

Math.NET, a mathematical opensource .Net project by Christoph Rüegg and contributors.