| 115 | return ' '.join([self.fields[0].textual_form() ,'and', self.fields[1].textual_form()]) |
| 116 | |
| 117 | class RNode(ASTNode): |
| 118 | def __init__(self, data_type, fields): |
| 119 | super().__init__('R', 'R', data_type, fields) |
| 120 | |
| 121 | def textual_form(self): |
| 122 | # only surface relation is reserved |
| 123 | assert self.depth == 1 |
| 124 | return self.textual_form_core() |
| 125 | |
| 126 | def textual_form_core(self): |
| 127 | return self.fields[0].textual_form() + ' by' |
| 128 | |
| 129 | class CountNode(ASTNode): |
| 130 | def __init__(self, data_type, fields): |