diff --git a/lex.py b/lex.py index 23dbc22..bd41af8 100755 --- a/lex.py +++ b/lex.py @@ -36,8 +36,11 @@ class Token(object): return self.fqname() in names def fqmatch(self, name, string): return self.fqname() == name and self.string == string - def fqmatchs(self, name, strings): - return self.fqname() == name and self.string in strings + def fqmatchs(self, name, strings, nocase=False): + if nocase: + return self.fqname() == name and self.string.lower() in strings + else: + return self.fqname() == name and self.string in strings def fqmatchp(self, pairs): for (name, string) in pairs: if self.fqmatch(name, string):