diff --git a/packages/website/docs/Internal/Grammar.md b/packages/website/docs/Internal/Grammar.md index d3b4f0a4..25d6abe1 100644 --- a/packages/website/docs/Internal/Grammar.md +++ b/packages/website/docs/Internal/Grammar.md @@ -10,10 +10,11 @@ _In all likelihood the reference will have to be debugged as we see what tests p ## Lexical descriptions of constants and identifiers -- `` ::= `[-]? [0-9]+ (.[0-9]+)? | [-]? [0-9]+ (.[0-9]+)? [e] [-]? [0-9]+` -- `` ::= `[a-zA-Z]+ [a-zA-Z0-9]?` -- `` ::= `normal(, ) | beta(, ) | triangular(, , ) | cauchy(, ) | lognormal(, )) | uniform(, ) | to | exponential()` -- `` ::= `true | false` +``` + ::= [-]? [0-9]+ (.[0-9]+)? | [-]? [0-9]+ (.[0-9]+)? [e] [-]? [0-9]+ + ::= [a-zA-Z]+ [a-zA-Z0-9]? + ::= true | false +``` ## Expressions @@ -22,10 +23,10 @@ The following gives no typing information. You can obey the grammar and still wr Think of javascript's list unpacking notation to read our variable-argument function `mixture`. ``` - ::= + | - | .+ | .- | | sample() | mixture(..., ) | mx(..., ) | exp() | log(, ?) | log10() | dotLog(, ?) | normalize() | isNormalized() | pdf(, ) | cdf(, ) | inv(, ) | mean() | truncate(, , ) | truncateLeft(, ) | truncateRight(, ) + ::= + | - | .+ | .- | ::= * | | / | .* | | ::= ^ | .^ | - ::= | | | | ( ) + ::= | | | ( ) | () ``` ## Data structures