-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvalidation_rules.txt
More file actions
41 lines (28 loc) · 799 Bytes
/
validation_rules.txt
File metadata and controls
41 lines (28 loc) · 799 Bytes
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
Rules for special tokens
------------------------
"||", "&&", "|"
---------------
1. cannot be followed by ||, &&, |, >, <, EOF, ')', '\n\n', ';'
i. in other words, you're "expecting" to see either a word or an open paren
"<"
--------------
1. cannot be followed by ANYTHING but a word.
i. including newlines
2. the above word cannot be followed by > or '('
">"
--------------
1. cannot be followed by ANYTHING but a word.
i. including newlines
2. the above word cannot be followed by >, <, |, or '('
";"
--------------
1. cannot be followed by ||, &&, |, >, <, ';'
"("
--------------
1. cannot be followed by ||, &&, |, >, <, EOF, ')', ';'
")"
----------
1. cannot be followed by '('
General Rules
-------------
1. A command cannot begin with anything but a word or "("