3 module ET = RecommTypes
5 let lc = String.lowercase_ascii
9 %token <string> SP NL OP CP PP SR KW CW HW SW OT
13 %type <RecommTypes.srcs> srcs
31 | inn_r inns { $1 ^ $2 }
35 | inn inns { $1 ^ $2 }
48 | out outs { $1 ^ $2 }
57 | SP CW cws { $2 :: $3 }
62 | SP sw sws { $2 :: $3 }
66 | OP PP inns CP { ET.Mark $3 }
67 | OP KW inns CP { ET.Key ($2, $3) }
68 | OP CW cws CP { ET.Title ($2 :: $3) }
69 | OP HW sws CP { ET.Slice (lc $2 :: $3) }
70 | OP CP { ET.Other ($1, "", $2) }
71 | OP inns_r CP { ET.Other ($1, $2, $3) }
72 | OP SR inns CP { ET.Other ($1, $2 ^ $3, $4) }
73 | OP SR SR inns CP { ET.Other ($1, $2 ^ $3 ^ $4, $5) }
80 | src_l srcs { $1 :: $2 }
84 | src srcs_l { $1 :: $2 }