summaryrefslogtreecommitdiff
path: root/apps/plugins/databox/edittoken.h
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/databox/edittoken.h')
-rw-r--r--apps/plugins/databox/edittoken.h98
1 files changed, 53 insertions, 45 deletions
diff --git a/apps/plugins/databox/edittoken.h b/apps/plugins/databox/edittoken.h
index a5c8d472e1..4c9f535448 100644
--- a/apps/plugins/databox/edittoken.h
+++ b/apps/plugins/databox/edittoken.h
@@ -19,54 +19,62 @@
19#ifndef EDITTOKEN_H 19#ifndef EDITTOKEN_H
20#define EDITTOKEN_H 20#define EDITTOKEN_H
21 21
22#define TOKEN_INVALID -1 22#define TOKEN_INVALID -1
23#define TOKEN_EOF 0 // EOF 23#define TOKEN_EOF 0 // EOF
24#define TOKEN_NOT 1 // "not" 24#define TOKEN_NOT 1 // "not"
25#define TOKEN_AND 2 // "and" 25#define TOKEN_AND 2 // "and"
26#define TOKEN_OR 3 // "or" 26#define TOKEN_OR 3 // "or"
27#define TOKEN_GT 4 // '>' 27#define TOKEN_GT 4 // '>'
28#define TOKEN_GTE 5 // '>=' 28#define TOKEN_GTE 5 // '>='
29#define TOKEN_LT 6 // '<' 29#define TOKEN_LT 6 // '<'
30#define TOKEN_LTE 7 // '<=' 30#define TOKEN_LTE 7 // '<='
31#define TOKEN_EQ 8 // '==' 31#define TOKEN_EQ 8 // '=='
32#define TOKEN_NE 9 // '!=' 32#define TOKEN_NE 9 // '!='
33#define TOKEN_CONTAINS 10 // "contains" 33#define TOKEN_CONTAINS 10 // "contains"
34#define TOKEN_EQUALS 11 // "equals" 34#define TOKEN_EQUALS 11 // "equals"
35#define TOKEN_LPAREN 12 // '(' 35#define TOKEN_STARTSWITH 12
36#define TOKEN_RPAREN 13 // ')' 36#define TOKEN_ENDSWITH 13
37#define TOKEN_NUM 14 // (0..9)+ 37#define TOKEN_LPAREN 14 // '('
38#define TOKEN_NUMIDENTIFIER 15 // year, trackid, bpm, etc. 38#define TOKEN_RPAREN 15 // ')'
39#define TOKEN_STRING 16 // (?)+ 39#define TOKEN_NUM 16 // (0..9)+
40#define TOKEN_STRINGIDENTIFIER 17 // album, artist, title, genre ... 40#define TOKEN_NUMIDENTIFIER 17 // year, trackid, bpm, etc.
41#define TOKEN_YEAR 18 41#define TOKEN_STRING 18 // (?)+
42#define TOKEN_RATING 19 42#define TOKEN_STRINGIDENTIFIER 19 // album, artist, title, genre ...
43#define TOKEN_PLAYCOUNT 20 43#define TOKEN_SHUFFLE 20
44#define TOKEN_TITLE 21 44#define TOKEN_PLAYTIMELIMIT 21
45#define TOKEN_ARTIST 22
46#define TOKEN_ALBUM 23
47#define TOKEN_GENRE 24
48#define TOKEN_FILENAME 25
49#define TOKEN_EDIT 26
50 45
51#define ACCEPT_EOF 0x1 46// pseudotokens..
52#define ACCEPT_BOOLOP 0x2 47#define TOKEN_YEAR 118
53#define ACCEPT_NUMOP 0x4 48#define TOKEN_RATING 119
54#define ACCEPT_STROP 0x8 49#define TOKEN_PLAYCOUNT 120
55#define ACCEPT_LPAREN 0x10 50#define TOKEN_TITLE 121
56#define ACCEPT_RPAREN 0x20 51#define TOKEN_ARTIST 122
57#define ACCEPT_NUMARG 0x40 52#define TOKEN_ALBUM 123
58#define ACCEPT_STRARG 0x80 53#define TOKEN_GENRE 124
59#define ACCEPT_NOT 0x100 54#define TOKEN_FILENAME 125
60#define ACCEPT_DELETE 0x200 55#define TOKEN_EDIT 126
56#define TOKEN_AUTORATING 127
61 57
62#define INTVALUE_YEAR 1 58#define ACCEPT_EOF 0x1
59#define ACCEPT_BOOLOP 0x2
60#define ACCEPT_NUMOP 0x4
61#define ACCEPT_STROP 0x8
62#define ACCEPT_LPAREN 0x10
63#define ACCEPT_RPAREN 0x20
64#define ACCEPT_NUMARG 0x40
65#define ACCEPT_STRARG 0x80
66#define ACCEPT_NOT 0x100
67#define ACCEPT_DELETE 0x200
68
69#define INTVALUE_YEAR 1
63#define INTVALUE_RATING 2 70#define INTVALUE_RATING 2
64#define INTVALUE_PLAYCOUNT 3 71#define INTVALUE_PLAYCOUNT 3
65#define INTVALUE_TITLE 4 72#define INTVALUE_AUTORATING 4
66#define INTVALUE_ARTIST 5 73#define INTVALUE_TITLE 14
67#define INTVALUE_ALBUM 6 74#define INTVALUE_ARTIST 15
68#define INTVALUE_GENRE 7 75#define INTVALUE_ALBUM 16
69#define INTVALUE_FILENAME 8 76#define INTVALUE_GENRE 17
77#define INTVALUE_FILENAME 18
70 78
71struct token { 79struct token {
72 char kind; 80 char kind;