NewDocs_euBNF
1. alpha = "a" .. "z" | "A" .. "Z"
2. digit = "0" .. "9"
3. uscore = "_"
4. eol = "new_line_character"
5. name = ( alpha1 | uscore3 ) { alpha1 | digit2 | uscore3 }
6. spacename = name5 ":"
7. identifier = [ spacename6 ] name5
8. atom = atom_integer_lit9 | atom_real_lit10
9. atom_integer_lit = "-253" .. "+253" | "-9.007e15" .. "+9.007e15"
10. atom_real_lit = "-21024+1" .. "+21024-1" | "-1.798e308+1" .. "+1.798e308-1"
11. integer = integer_lit12
12. integer_lit = "-230" .. "+230-1" | "-1_073_741_824" .. "+1_073_741_823"
13. sequence = "{" [ object14 ] { "," object14 } [ "," "$" ] "}"
14. object = atom8 | integer11 | sequence13
15. expression = atomexpr16 | intexpr17 | strexpr18 | seqexpr19 | boolexpr21
16. atomexpr = atom8
17. intexpr = integer11
18. strexpr = "an_expression_that_evaluates_to_a_string"
19. seqexpr = sequence13
20. bool_lit = "0" | "1" | "0" | "!0"
21. boolexpr = "atom_zero_represents_falsehood_and_non-zero_represents_truth"
22. relationop = "<" | ">" | "<=" | ">=" | "=" | "!="
23. binaryexpr = { expression15 binop24 expression15 }
24. binop = "and" | "or" | "xor" | "+" | "-" | "*" | "/" | "&"
25. unaryexpr = { unaryop26 expression15 }
26. unaryop = "not" | "-" | "+"
27. seqenceop = "{" [ item29 | { headitem28 } item29 ] [ lastitem30 ] "}"
28. headitem = object14 ","
29. item = object14
30. lastitem = "," "$"
31. statement = "complete_unit_of_code_executed_by_the_interpreter"
32. stmblk = statement31 { statement31 }
33. label = "label" stringlit35
34. listdelim = ","
35. stringlit = simplestringlit36 | rawstringlit42
36. simplestringlit = sslitstart37 { char39 | escchar40 } sslitend38
37. sslitstart = "\""
38. sslitend = "\""
39. char = "any_byte_value"
40. escchar = esclead41 ( "t" | "n" | "r" | "
" )
41. esclead = "
"
42. rawstringlit = dqrawstring43 | bqrawstring44
43. dqrawstring = "\"\"\"" [ marginstr45 ] { char39 } "\"\"\""
44. bqrawstring = "`" [ marginstr45 ] { char39 } "`"
45. marginstr = "_"
46. scopemodifier = "global" | "public" | "export" | "override"
47. datatype = "atom" | "integer" | "sequence" | "object" | identifier7
48. includestmt = "include" fileref49 [ "as" namespaceid50 ] eol4
49. fileref = "file_path_that_may_be_enclosed_in_double-quotes"
50. namespaceid = identifier7
51. slice = slicestart52 intexpr17 slicedelim53 ( intexpr17 | "$" ) sliceend54
52. slicestart = "["
53. slicedelim = ".."
54. sliceend = "]"
55. ifstmt = iftest56 { elsif57 } [ else58 ] endif59
56. iftest = "if" atomexpr16 [ label33 ] "then" [ stmblk32 ]
57. elsif = "elsif" atomexpr16 "then" [ stmblk32 ]
58. else = "else" [ stmblk32 ]
59. endif = "end" "if"
60. ifdefstmt = ifdeftest61 [ elsdefif62 { char39 } ] [ elsedef63 ] enddefif64
61. ifdeftest = "ifdef" defexpr65 "then" [ stmblk32 ]
62. elsdefif = "elsifedf" defexpr65 "then" [ stmblk32 ]
63. elsedef = "elsede" [stmblk]"
64. enddefif = "end" "ifdef"
65. defexpr = defterm66 [ defop67 defterm66 ]
66. defterm = [ "not" identifier7 ]
67. defop = "and" | "or"
68. switchstmt = switchtest69 case71 { case71 } [ caseelse73 ] [ endswitch74 ]
69. switchtest = "switch" expression15 [ withfall70 ] [ label33 ] "do"
70. withfall = ( "with" | "without" ) "fallthru"
71. case = "case" caselist72 "then" [ stmblk32 ]
72. caselist = expression15 { listdelim34 expression15 }
73. caseelse = "case" "else"
74. endswitch = "end" "switch"
75. breakstmt = "break" [ stringlit35 ]
76. continuestmt = "continue" [ stringlit35 ]
77. retrystmt = "retry" [ stringlit35 ]
78. exitstmt = "exit" [ stringlit35 ]
79. fallthrustmt = "fallthru"
80. forstmt = "for" foridx81 [ label33 ] "do" [ stmblk32 ] "end" "for"
81. foridx = identifier7 "=" atomexpr16 "to" atomexpr16 [ "by" atomexpr16 ]
82. whilestmt = "while" boolexpr21 [ withentry83 ] [ label33 ] "do" stmblk32 [ entry84 ] "end" "while"
83. withentry = "with" "entry"
84. entry = "entry" [ stmblk32 ]
85. loopstmt = "loop" [ withentry83 ] [ label33 ] "do" stmblk32 [ entry84 ] "until" boolexpr21 "end" "loop"
86. gotostmt = "goto" label33
87. vardeclare = [ scopemodifier46 ] datatype47 identlist88
88. identlist = ident89 [ "," identlist88 ]
89. ident = identifier7 [ "=" expression15 ]
90. constdeclare = [ scopemodifier46 ] "constant" identlist88
91. enumdeclare = [ scopemodifier46 ] [ enumval92 | enumtype94 ]
92. enumval = "enum" [ "by" enumdelta93 ] identlist88
93. enumdelta = [ "+" | "-" | "*" | "/" ] atomexpr16
94. enumtype = "enum" "type" [ "by" enumdelta93 ] identlist88 "end" "type"
95. call = identifier7 "(" [ arglist96 ] ")"
96. arglist = argument97 [ "," arglist96 ]
97. argument = expression15
98. procdeclare = [ scopemodifier46 ] "procedure" identifier7 "(" [ paramlist99 ] ")" [ stmblk32 ] "end" "procedure"
99. paramlist = parameter100 [ "," paramlist99 ]
100. parameter = datatype47 identifier7
101. funcdeclare = [ scopemodifier46 ] "function" identifier7 "(" [ paramlist99 ] ")" [ stmblk32 ] "end" "function"
102. typedeclar = [ scopemodifier46 ] "type" identifier7 "(" parameter100 ")" [ stmblk32 ] "end" "type"
103. return = "return" expression15
104. namespace = "namespace" identifier7 eol4
105. withstmt = [ "with" | "without" ] withoption106
106. withoption = [ "profile" | "profile_time" | "trace" | "batch" | "type_check" | "indirect_includes" | "inline" | withwarning107 ]
107. withwarning = "warning" [ warnopt108 ]
108. warnopt = setwarn109 | addwarn? | savewarn110 | restorewarn111 | strictwarn112
109. setwarn = [ "+=" | "&=" ] "{" warnlist? "}"
110. savewarn = "save"
111. restorewarn = "restore"
112. strictwarn = "strict"
113. subscripting = identifier7 { index114 }
114. index = "[" intexpr17 "]"
115. assignmono = identifier7 "=" expression15
116. assignmulti = "{" identifier7 [ { "," identifier7 } ] "}" "=" expression15 | "{" expression15 [ { "," expression15 } ] "}"
117. assignwithop = identifier7 ( "+" | "-" | "/" | "*" | "&" ) "=" expression15