MPL.mpl 1.54 KB
Newer Older
Custom2043's avatar
Custom2043 committed
1
2
3
4
quote = "\""
singleQuote = "\'"
backslash = "\\"

Custom2043's avatar
Custom2043 committed
5
#NumberChar = "0" (base:"b" {value:'0-1'})|(base:"x" {value:'0-9|A-F'})|(base:"d" {value:digit})
Custom2043's avatar
Custom2043 committed
6
#SingleChar = (backslash backslash:("b"|"r"|"t"|"n"|backslash|quote|singleQuote)) | anyChar
7
CharacterToken = singleQuote [notToken:notToken] {|orToken character1:(NumberChar|SingleChar) ["-" character2:(NumberChar|SingleChar)]} singleQuote
Custom2043's avatar
Custom2043 committed
8
StringToken = (quote {charTokens:(CharacterToken | SingleChar)} quote) | singleChar:CharacterToken
Custom2043's avatar
Custom2043 committed
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24

letter = 'a-z|A-Z'
digit = '0-9'
exprOpen = "("
exprClose = ")"
optionOpen = "["
optionClose = "]"
arrayOpen = "{"
arrayClose = "}"
notToken = "!"
orToken = "|"
transientToken = "#"
equals = "="
Jump = "\r\n"|"\r"|"\n"
Space = " "|"\t"

Custom2043's avatar
fix +++    
Custom2043 committed
25
allToken = "*"
Custom2043's avatar
Custom2043 committed
26
27
28
29
30
31
Identifier = firstLetter:letter [{idName:(letter|digit)}]

ignore = {Space|Jump}
SearchName = id:Identifier ":"
LineHeader = [trans:transientToken] id:Identifier equals

Custom2043's avatar
fix +++    
Custom2043 committed
32
TokenSearchToken = [not:notToken] ([trans:transientToken] id:Identifier)|string:StringToken|allToken
Custom2043's avatar
Custom2043 committed
33
ArraySearchToken = [{minSize:digit} "-"] arrayOpen [orToken left:SearchToken] {searches:SearchToken} [right:SearchToken orToken] arrayClose ["-" {maxSize:digit}]
Custom2043's avatar
Custom2043 committed
34
35
OptionalSearchToken = optionOpen {searches:SearchToken} optionClose
BracketSearchToken = exprOpen {searches:SearchToken} exprClose
Custom2043's avatar
Add jar    
Custom2043 committed
36
OrSearchToken = 2-{searches:#SearchToken orToken|}
Custom2043's avatar
Custom2043 committed
37

38
#SearchToken = ([searchName:SearchName] searchToken:(TokenSearchToken|ArraySearchToken|OptionalSearchToken|BracketSearchToken)) | searchToken:OrSearchToken
Custom2043's avatar
Custom2043 committed
39

40
Line = header:LineHeader {searchTokens:SearchToken}
Custom2043's avatar
Custom2043 committed
41

Custom2043's avatar
Custom2043 committed
42
anyChar = '*'