parser.py (8454:fad37c6670a6) | parser.py (9104:27d56b644e78) |
---|---|
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 --- 256 unchanged lines hidden (view full) --- 265 p[0] = ast.InPortDeclAST(self, p[3], p[5], p[7], p[8], p[10]) 266 267 def p_decl__out_port(self, p): 268 "decl : OUT_PORT '(' ident ',' type ',' var pairs ')' SEMI" 269 p[0] = ast.OutPortDeclAST(self, p[3], p[5], p[7], p[8]) 270 271 def p_decl__trans0(self, p): 272 "decl : TRANS '(' idents ',' idents ',' ident pairs ')' idents" | 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 --- 256 unchanged lines hidden (view full) --- 265 p[0] = ast.InPortDeclAST(self, p[3], p[5], p[7], p[8], p[10]) 266 267 def p_decl__out_port(self, p): 268 "decl : OUT_PORT '(' ident ',' type ',' var pairs ')' SEMI" 269 p[0] = ast.OutPortDeclAST(self, p[3], p[5], p[7], p[8]) 270 271 def p_decl__trans0(self, p): 272 "decl : TRANS '(' idents ',' idents ',' ident pairs ')' idents" |
273 p[0] = ast.TransitionDeclAST(self, p[3], p[5], p[7], p[8], p[10]) | 273 p[0] = ast.TransitionDeclAST(self, [], p[3], p[5], p[7], p[8], p[10]) |
274 275 def p_decl__trans1(self, p): 276 "decl : TRANS '(' idents ',' idents pairs ')' idents" | 274 275 def p_decl__trans1(self, p): 276 "decl : TRANS '(' idents ',' idents pairs ')' idents" |
277 p[0] = ast.TransitionDeclAST(self, p[3], p[5], None, p[6], p[8]) | 277 p[0] = ast.TransitionDeclAST(self, [], p[3], p[5], None, p[6], p[8]) |
278 | 278 |
279 def p_decl__trans2(self, p): 280 "decl : TRANS '(' idents ',' idents ',' ident pairs ')' idents idents" 281 p[0] = ast.TransitionDeclAST(self, p[10], p[3], p[5], p[7], p[8], p[11]) 282 283 def p_decl__trans3(self, p): 284 "decl : TRANS '(' idents ',' idents pairs ')' idents idents" 285 p[0] = ast.TransitionDeclAST(self, p[8], p[3], p[5], None, p[6], p[9]) 286 |
|
279 def p_decl__extern0(self, p): 280 "decl : EXTERN_TYPE '(' type pairs ')' SEMI" 281 p[4]["external"] = "yes" 282 p[0] = ast.TypeDeclAST(self, p[3], p[4], []) 283 284 def p_decl__global(self, p): 285 "decl : GLOBAL '(' type pairs ')' '{' type_members '}'" 286 p[4]["global"] = "yes" --- 426 unchanged lines hidden --- | 287 def p_decl__extern0(self, p): 288 "decl : EXTERN_TYPE '(' type pairs ')' SEMI" 289 p[4]["external"] = "yes" 290 p[0] = ast.TypeDeclAST(self, p[3], p[4], []) 291 292 def p_decl__global(self, p): 293 "decl : GLOBAL '(' type pairs ')' '{' type_members '}'" 294 p[4]["global"] = "yes" --- 426 unchanged lines hidden --- |