-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgrammar.txt
More file actions
18 lines (18 loc) · 1.07 KB
/
grammar.txt
File metadata and controls
18 lines (18 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Program -> Block | Block Block
Statement -> Declaration | Identifier | Assignment
Declaration -> Identifier | Identifier Type
Identifier -> AlphaNumeric | Tabs AlphaNumeric
Assignment -> Declaration EqualSign Value
Type -> Bool | Number | String
AlphaNumeric -> Alpha Numeric
Alpha -> Alpha Alpha | /[a-zA-Z]/
Tabs -> Tabs Tabs | \t
Numeric -> Numeric Numeric | /[0-9]/
Number -> Number.Number
Character -> /[a-zA-Z]`~!@#$%^&*\(\)-_=+|\\:;'\?<>,\./
Quote -> "
String -> Quote Character Quote | Character Character
EqualSign -> =
NewLine -> \r\n | \n
Block -> Statement | Statement Statement
Value -> Bool | Number | String