repo.or.cz
/
stuff.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
added cuesheet grammar and generated module
[stuff.git]
/
transcode
/
cuesheet.g~
blob
dfcea5bda86aee3729f9f272cd693877e1a380db
1
parser cue:
2
3
ignore: '\\s'
4
token END: "$"
5
token NUM: '[0-9]+'
6
token KEYWORD: '[A-Z]+'
7
token STR: '"([^\\"]+|\\\\.)*"'
8
9
rule track : KEYWORD
10
(
11
NUM {{ return (KEYWORD, string.atoi(NUM)) }}
12
| STR {{ return (KEYWORD, STR) }}
13
)
14
15
rule sheet : {{ result = [] }}
16
(
17
track {{ result.append(track) }}
18
)*
19
END {{ return result }}
20