parser.py (6714:028047200ff7) parser.py (6863:21fbf0412e0d)
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

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

509 "statement : expr ASSIGN expr SEMI"
510 p[0] = ast.AssignStatementAST(self, p[1], p[3])
511
512 def p_statement__enqueue(self, p):
513 "statement : ENQUEUE '(' var ',' type pairs ')' statements"
514 p[0] = ast.EnqueueStatementAST(self, p[3], p[5], p[6], p[8])
515
516 def p_statement__peek(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

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

509 "statement : expr ASSIGN expr SEMI"
510 p[0] = ast.AssignStatementAST(self, p[1], p[3])
511
512 def p_statement__enqueue(self, p):
513 "statement : ENQUEUE '(' var ',' type pairs ')' statements"
514 p[0] = ast.EnqueueStatementAST(self, p[3], p[5], p[6], p[8])
515
516 def p_statement__peek(self, p):
517 "statement : PEEK '(' var ',' type ')' statements"
518 p[0] = ast.PeekStatementAST(self, p[3], p[5], p[7], "peek")
517 "statement : PEEK '(' var ',' type pairs ')' statements"
518 p[0] = ast.PeekStatementAST(self, p[3], p[5], p[6], p[8], "peek")
519
520 def p_statement__copy_head(self, p):
521 "statement : COPY_HEAD '(' var ',' var pairs ')' SEMI"
522 p[0] = ast.CopyHeadStatementAST(self, p[3], p[5], p[6])
523
524 def p_statement__check_allocate(self, p):
525 "statement : CHECK_ALLOCATE '(' var ')' SEMI"
526 p[0] = ast.CheckAllocateStatementAST(self, p[3])

--- 141 unchanged lines hidden ---
519
520 def p_statement__copy_head(self, p):
521 "statement : COPY_HEAD '(' var ',' var pairs ')' SEMI"
522 p[0] = ast.CopyHeadStatementAST(self, p[3], p[5], p[6])
523
524 def p_statement__check_allocate(self, p):
525 "statement : CHECK_ALLOCATE '(' var ')' SEMI"
526 p[0] = ast.CheckAllocateStatementAST(self, p[3])

--- 141 unchanged lines hidden ---