Mercurial > lcfOS
comparison python/ppci/c3/parser.py @ 311:ff665880a6b0
Added testcase for kernel and userspace
author | Windel Bouwman |
---|---|
date | Mon, 16 Dec 2013 12:49:24 +0100 |
parents | 2e7f55319858 |
children | 04cf4d26a3bc |
comparison
equal
deleted
inserted
replaced
310:e95e5572cd6d | 311:ff665880a6b0 |
---|---|
384 val = self.Consume('true') | 384 val = self.Consume('true') |
385 return Literal(True, val.loc) | 385 return Literal(True, val.loc) |
386 elif self.Peak == 'false': | 386 elif self.Peak == 'false': |
387 val = self.Consume('false') | 387 val = self.Consume('false') |
388 return Literal(False, val.loc) | 388 return Literal(False, val.loc) |
389 elif self.Peak == 'STRING': | |
390 val = self.Consume('STRING') | |
391 return Literal(val.val, val.loc) | |
389 elif self.Peak == 'ID': | 392 elif self.Peak == 'ID': |
390 return self.parseDesignator() | 393 return self.parseDesignator() |
391 self.Error('Expected NUM, ID or (expr), got {0}'.format(self.Peak)) | 394 self.Error('Expected NUM, ID or (expr), got {0}'.format(self.Peak)) |