Blame view

code/biflang/bif.ebnf 1.71 KB
3e0f9b8a   Francisco Coelho   back to work?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
Digit ::= [0-9]
PDigit::= [1-0]
Letter ::= ["a"-"z" "A"-"Z" "_" "-"]
Word   ::= Letter (Letter | Digit)*

Decimal         ::= PDigit Digit*
Exponent        ::= ("e" | "E") ("+" | "-")? Digit+
FloatingPoint   ::= Digit+ "." Digit* Exponent?
    |   "." Digit+ Exponent?
    |   Digit+ Exponent


NetworkKW         ::= "network"
VariableKW        ::= "variable"
ProbabilityKW     ::= "probability" 
PropertyKW        ::= "property" 
VariableTypeKW    ::= "type" 
DiscreteKW        ::= "discrete" 
DefaultValueKW    ::= "default" 
TableValuesKW     ::= "table" 

PropertyString  ::= PropertyKW (~";")* ";"

Property            ::= 
FloatingPointToken  ::=

FloatingPointList   ::= FloatingPointToken+

ProbabilityTable    ::= FloatingPointList ";"

ProbabilityDefaultEntry ::=  FloatingPointList ";"

ProbabilityVariableValue    ::= Word

ProbabilityValuesList   ::= "(" ProbabilityVariableValue+ ")"

ProbabilityEntry    ::=  ProbabilityValuesList FloatingPointList ";"

ProbabilityContent  ::=  "{" ( Property | ProbabilityDefaultEntry   | ProbabilityEntry | ProbabilityTable )* "}"

ProbabilityVariableName ::= 

ProbabilityVariablesList ::= "(" ProbabilityVariableName+ ")"

ProbabilityDeclaration  ::= ProbabilityKW ProbabilityVariablesList ProbabilityContent


VariableValuesList  ::= ProbabilityVariableValue+

VariableDiscrete ::= VariableTypeKW DiscreteKW "[" Decimal "]" 
        "{" VariableValuesList "}" ";"

VariableContent ::= "{" (Property | VariableDiscrete)* "}"

VariableDeclaration ::= VariableKW ProbabilityVariableName VariableContent


NetworkContent  ::=  "{" ( Property )* "}"
NetworkDeclaration  ::= NetworkKW Word NetworkContent

CompilationUnit ::= NetworkDeclaration (VariableDeclaration | ProbabilityDeclaration)* EOS