comparison expr.py @ 13:ec0e83ec329f

allow both kinds of strings
author Jeff Hammel <jhammel@mozilla.com>
date Fri, 03 Jun 2011 11:15:40 -0700
parents 835efd8acb04
children 6f0c032b65f5
comparison
equal deleted inserted replaced
12:835efd8acb04 13:ec0e83ec329f
137 137
138 scanner = re.Scanner([ 138 scanner = re.Scanner([
139 (r"true|false", bool_), 139 (r"true|false", bool_),
140 (r"[a-zA-Z_]\w*", identifier), 140 (r"[a-zA-Z_]\w*", identifier),
141 (r"[0-9]+", integer), 141 (r"[0-9]+", integer),
142 (r'"[^"]*"', string_), 142 (r'("[^"]*")|(\'[^\']*\')', string_),
143 (r"==", eq), 143 (r"==", eq),
144 (r"!=", neq), 144 (r"!=", neq),
145 (r"\|\|", or_), 145 (r"\|\|", or_),
146 (r"&&", and_), 146 (r"&&", and_),
147 (r"\(", lparen), 147 (r"\(", lparen),