parser.py (10964:2b4fe083d17b) | parser.py (10981:b300dcda5896) |
---|---|
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 --- 99 unchanged lines hidden (view full) --- 108 'structure' : 'STRUCT', 109 'external_type' : 'EXTERN_TYPE', 110 'enumeration' : 'ENUM', 111 'state_declaration' : 'STATE_DECL', 112 'peek' : 'PEEK', 113 'stall_and_wait' : 'STALL_AND_WAIT', 114 'enqueue' : 'ENQUEUE', 115 'check_allocate' : 'CHECK_ALLOCATE', | 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 --- 99 unchanged lines hidden (view full) --- 108 'structure' : 'STRUCT', 109 'external_type' : 'EXTERN_TYPE', 110 'enumeration' : 'ENUM', 111 'state_declaration' : 'STATE_DECL', 112 'peek' : 'PEEK', 113 'stall_and_wait' : 'STALL_AND_WAIT', 114 'enqueue' : 'ENQUEUE', 115 'check_allocate' : 'CHECK_ALLOCATE', |
116 'check_next_cycle' : 'CHECK_NEXT_CYCLE', |
|
116 'check_stop_slots' : 'CHECK_STOP_SLOTS', 117 'static_cast' : 'STATIC_CAST', 118 'if' : 'IF', 119 'is_valid' : 'IS_VALID', 120 'is_invalid' : 'IS_INVALID', 121 'else' : 'ELSE', 122 'return' : 'RETURN', 123 'void' : 'VOID', --- 468 unchanged lines hidden (view full) --- 592 def p_statement__peek(self, p): 593 "statement : PEEK '(' var ',' type pairs ')' statements" 594 p[0] = ast.PeekStatementAST(self, p[3], p[5], p[6], p[8], "peek") 595 596 def p_statement__check_allocate(self, p): 597 "statement : CHECK_ALLOCATE '(' var ')' SEMI" 598 p[0] = ast.CheckAllocateStatementAST(self, p[3]) 599 | 117 'check_stop_slots' : 'CHECK_STOP_SLOTS', 118 'static_cast' : 'STATIC_CAST', 119 'if' : 'IF', 120 'is_valid' : 'IS_VALID', 121 'is_invalid' : 'IS_INVALID', 122 'else' : 'ELSE', 123 'return' : 'RETURN', 124 'void' : 'VOID', --- 468 unchanged lines hidden (view full) --- 593 def p_statement__peek(self, p): 594 "statement : PEEK '(' var ',' type pairs ')' statements" 595 p[0] = ast.PeekStatementAST(self, p[3], p[5], p[6], p[8], "peek") 596 597 def p_statement__check_allocate(self, p): 598 "statement : CHECK_ALLOCATE '(' var ')' SEMI" 599 p[0] = ast.CheckAllocateStatementAST(self, p[3]) 600 |
601 def p_statement__check_next_cycle(self, p): 602 "statement : CHECK_NEXT_CYCLE '(' ')' SEMI" 603 p[0] = ast.CheckNextCycleAST(self) 604 |
|
600 def p_statement__check_stop(self, p): 601 "statement : CHECK_STOP_SLOTS '(' var ',' STRING ',' STRING ')' SEMI" 602 p[0] = ast.CheckStopStatementAST(self, p[3], p[5], p[7]) 603 604 def p_statement__return(self, p): 605 "statement : RETURN expr SEMI" 606 p[0] = ast.ReturnStatementAST(self, p[2]) 607 --- 133 unchanged lines hidden --- | 605 def p_statement__check_stop(self, p): 606 "statement : CHECK_STOP_SLOTS '(' var ',' STRING ',' STRING ')' SEMI" 607 p[0] = ast.CheckStopStatementAST(self, p[3], p[5], p[7]) 608 609 def p_statement__return(self, p): 610 "statement : RETURN expr SEMI" 611 p[0] = ast.ReturnStatementAST(self, p[2]) 612 --- 133 unchanged lines hidden --- |