parser.py (10155:3b0bcc8c34ca) parser.py (10165:7e9edf4297a9)
1# Copyright (c) 2009 The Hewlett-Packard Development Company
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

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

273 "decl : IN_PORT '(' ident ',' type ',' var pairs ')' statements"
274 p[0] = ast.InPortDeclAST(self, p[3], p[5], p[7], p[8], p[10])
275
276 def p_decl__out_port(self, p):
277 "decl : OUT_PORT '(' ident ',' type ',' var pairs ')' SEMI"
278 p[0] = ast.OutPortDeclAST(self, p[3], p[5], p[7], p[8])
279
280 def p_decl__trans0(self, p):
1# Copyright (c) 2009 The Hewlett-Packard Development Company
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

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

273 "decl : IN_PORT '(' ident ',' type ',' var pairs ')' statements"
274 p[0] = ast.InPortDeclAST(self, p[3], p[5], p[7], p[8], p[10])
275
276 def p_decl__out_port(self, p):
277 "decl : OUT_PORT '(' ident ',' type ',' var pairs ')' SEMI"
278 p[0] = ast.OutPortDeclAST(self, p[3], p[5], p[7], p[8])
279
280 def p_decl__trans0(self, p):
281 "decl : TRANS '(' idents ',' idents ',' ident pairs ')' idents"
282 p[0] = ast.TransitionDeclAST(self, [], p[3], p[5], p[7], p[8], p[10])
281 "decl : TRANS '(' idents ',' idents ',' ident ')' idents"
282 p[0] = ast.TransitionDeclAST(self, [], p[3], p[5], p[7], p[9])
283
284 def p_decl__trans1(self, p):
283
284 def p_decl__trans1(self, p):
285 "decl : TRANS '(' idents ',' idents pairs ')' idents"
286 p[0] = ast.TransitionDeclAST(self, [], p[3], p[5], None, p[6], p[8])
285 "decl : TRANS '(' idents ',' idents ')' idents"
286 p[0] = ast.TransitionDeclAST(self, [], p[3], p[5], None, p[7])
287
288 def p_decl__trans2(self, p):
287
288 def p_decl__trans2(self, p):
289 "decl : TRANS '(' idents ',' idents ',' ident pairs ')' idents idents"
290 p[0] = ast.TransitionDeclAST(self, p[10], p[3], p[5], p[7], p[8], p[11])
289 "decl : TRANS '(' idents ',' idents ',' ident ')' idents idents"
290 p[0] = ast.TransitionDeclAST(self, p[9], p[3], p[5], p[7], p[10])
291
292 def p_decl__trans3(self, p):
291
292 def p_decl__trans3(self, p):
293 "decl : TRANS '(' idents ',' idents pairs ')' idents idents"
294 p[0] = ast.TransitionDeclAST(self, p[8], p[3], p[5], None, p[6], p[9])
293 "decl : TRANS '(' idents ',' idents ')' idents idents"
294 p[0] = ast.TransitionDeclAST(self, p[7], p[3], p[5], None, p[8])
295
296 def p_decl__extern0(self, p):
297 "decl : EXTERN_TYPE '(' type pairs ')' SEMI"
298 p[4]["external"] = "yes"
299 p[0] = ast.TypeDeclAST(self, p[3], p[4], [])
300
301 def p_decl__global(self, p):
302 "decl : GLOBAL '(' type pairs ')' '{' type_members '}'"

--- 417 unchanged lines hidden ---
295
296 def p_decl__extern0(self, p):
297 "decl : EXTERN_TYPE '(' type pairs ')' SEMI"
298 p[4]["external"] = "yes"
299 p[0] = ast.TypeDeclAST(self, p[3], p[4], [])
300
301 def p_decl__global(self, p):
302 "decl : GLOBAL '(' type pairs ')' '{' type_members '}'"

--- 417 unchanged lines hidden ---