parser.py (11283:4cc8b312f026) parser.py (11888:d89dc575c7cb)
1# Copyright (c) 2009 The Hewlett-Packard Development Company
1# Copyright (c) 2009 The Hewlett-Packard Development Company
2# Copyright (c) 2017 Google Inc.
2# All rights reserved.
3#
4# Redistribution and use in source and binary forms, with or without
5# modification, are permitted provided that the following conditions are
6# met: redistributions of source code must retain the above copyright
7# notice, this list of conditions and the following disclaimer;
8# redistributions in binary form must reproduce the above copyright
9# notice, this list of conditions and the following disclaimer in the

--- 10 unchanged lines hidden (view full) ---

20# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
21# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
22# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
23# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
25# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26#
27# Authors: Nathan Binkert
3# All rights reserved.
4#
5# Redistribution and use in source and binary forms, with or without
6# modification, are permitted provided that the following conditions are
7# met: redistributions of source code must retain the above copyright
8# notice, this list of conditions and the following disclaimer;
9# redistributions in binary form must reproduce the above copyright
10# notice, this list of conditions and the following disclaimer in the

--- 10 unchanged lines hidden (view full) ---

21# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27#
28# Authors: Nathan Binkert
29# Lena Olson
28
29import os.path
30import re
31import sys
32
33from m5.util import code_formatter
34from m5.util.grammar import Grammar, ParseError
35

--- 117 unchanged lines hidden (view full) ---

153 t_SEMI = r';'
154 t_ASSIGN = r':='
155 t_DOT = r'\.'
156 t_INCR = r'\+\+'
157 t_DECR = r'--'
158
159 precedence = (
160 ('left', 'INCR', 'DECR'),
30
31import os.path
32import re
33import sys
34
35from m5.util import code_formatter
36from m5.util.grammar import Grammar, ParseError
37

--- 117 unchanged lines hidden (view full) ---

155 t_SEMI = r';'
156 t_ASSIGN = r':='
157 t_DOT = r'\.'
158 t_INCR = r'\+\+'
159 t_DECR = r'--'
160
161 precedence = (
162 ('left', 'INCR', 'DECR'),
161 ('left', 'AND', 'OR'),
163 ('left', 'OR'),
164 ('left', 'AND'),
162 ('left', 'EQ', 'NE'),
163 ('left', 'LT', 'GT', 'LE', 'GE'),
164 ('left', 'RIGHTSHIFT', 'LEFTSHIFT'),
165 ('left', 'PLUS', 'DASH'),
166 ('left', 'STAR', 'SLASH'),
167 ('right', 'NOT', 'UMINUS'),
168 )
169

--- 575 unchanged lines hidden ---
165 ('left', 'EQ', 'NE'),
166 ('left', 'LT', 'GT', 'LE', 'GE'),
167 ('left', 'RIGHTSHIFT', 'LEFTSHIFT'),
168 ('left', 'PLUS', 'DASH'),
169 ('left', 'STAR', 'SLASH'),
170 ('right', 'NOT', 'UMINUS'),
171 )
172

--- 575 unchanged lines hidden ---