diff options
| author | Joakim Verona | 2011-07-31 23:57:51 +0200 |
|---|---|---|
| committer | Joakim Verona | 2011-07-31 23:57:51 +0200 |
| commit | 332f858fd7fa815846cfc48219df8952c75a44ae (patch) | |
| tree | 0090ab405bb08d817b530130af98c9a580f6ee1d /etc/grammars/python.wy | |
| parent | fceaa88120e9f907c279baecd2e755b16e667059 (diff) | |
| parent | e8500ff4af0d6c390f66a1f6d7d22695e590a8af (diff) | |
| download | emacs-332f858fd7fa815846cfc48219df8952c75a44ae.tar.gz emacs-332f858fd7fa815846cfc48219df8952c75a44ae.zip | |
merge upstream
Diffstat (limited to 'etc/grammars/python.wy')
| -rw-r--r-- | etc/grammars/python.wy | 89 |
1 files changed, 69 insertions, 20 deletions
diff --git a/etc/grammars/python.wy b/etc/grammars/python.wy index a8dafd6f955..8a7b7771d53 100644 --- a/etc/grammars/python.wy +++ b/etc/grammars/python.wy | |||
| @@ -1,34 +1,83 @@ | |||
| 1 | ;;; semantic/wisent/python.wy -- LALR grammar for Python | 1 | ;;; python.wy -- LALR grammar for Python |
| 2 | ;; | 2 | |
| 3 | ;; Copyright (C) 2002, 2003, 2004, 2007 Richard Kim | 3 | ;; Copyright (C) 2002-2011 Free Software Foundation, Inc. |
| 4 | ;; | 4 | ;; Copyright (C) 2001-2010 Python Software Foundation |
| 5 | |||
| 5 | ;; Author: Richard Kim <ryk@dspwiz.com> | 6 | ;; Author: Richard Kim <ryk@dspwiz.com> |
| 6 | ;; Maintainer: Richard Kim <ryk@dspwiz.com> | 7 | ;; Maintainer: Richard Kim <ryk@dspwiz.com> |
| 7 | ;; Created: June 2002 | 8 | ;; Created: June 2002 |
| 8 | ;; Keywords: syntax | 9 | ;; Keywords: syntax |
| 9 | ;; | 10 | ;; |
| 10 | ;; This file is not part of GNU Emacs. | 11 | ;; This file is part of GNU Emacs. |
| 11 | ;; | 12 | |
| 12 | ;; This program is free software; you can redistribute it and/or | 13 | ;; GNU Emacs is free software: you can redistribute it and/or modify |
| 13 | ;; modify it under the terms of the GNU General Public License as | 14 | ;; it under the terms of the GNU General Public License as published by |
| 14 | ;; published by the Free Software Foundation; either version 2, or (at | 15 | ;; the Free Software Foundation, either version 3 of the License, or |
| 15 | ;; your option) any later version. | 16 | ;; (at your option) any later version. |
| 16 | ;; | 17 | |
| 17 | ;; This software is distributed in the hope that it will be useful, | 18 | ;; GNU Emacs is distributed in the hope that it will be useful, |
| 18 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | 19 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 19 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 20 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 20 | ;; General Public License for more details. | 21 | ;; GNU General Public License for more details. |
| 21 | ;; | 22 | |
| 22 | ;; You should have received a copy of the GNU General Public License | 23 | ;; You should have received a copy of the GNU General Public License |
| 23 | ;; along with GNU Emacs; see the file COPYING. If not, write to the | 24 | ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. |
| 24 | ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | ||
| 25 | ;; Boston, MA 02110-1301, USA. | ||
| 26 | 25 | ||
| 27 | ;;; Commentary: | 26 | ;;; Commentary: |
| 28 | ;; | 27 | ;; |
| 29 | ;; This is an LALR python parser that follows the official python | 28 | ;; This is an LALR python parser that follows the official python |
| 30 | ;; grammar closely with very few exceptions. | 29 | ;; grammar closely with very few exceptions. The Python grammar is |
| 30 | ;; used and reproduced under the following license: | ||
| 31 | ;; | ||
| 32 | ;; PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2 | ||
| 33 | ;; -------------------------------------------- | ||
| 34 | ;; 1. This LICENSE AGREEMENT is between the Python Software Foundation | ||
| 35 | ;; ("PSF"), and the Individual or Organization ("Licensee") accessing | ||
| 36 | ;; and otherwise using this software ("Python") in source or binary | ||
| 37 | ;; form and its associated documentation. | ||
| 38 | ;; | ||
| 39 | ;; 2. Subject to the terms and conditions of this License Agreement, | ||
| 40 | ;; PSF hereby grants Licensee a nonexclusive, royalty-free, world-wide | ||
| 41 | ;; license to reproduce, analyze, test, perform and/or display | ||
| 42 | ;; publicly, prepare derivative works, distribute, and otherwise use | ||
| 43 | ;; Python alone or in any derivative version, provided, however, that | ||
| 44 | ;; PSF's License Agreement and PSF's notice of copyright, i.e., | ||
| 45 | ;; "Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, | ||
| 46 | ;; 2009, 2010 Python Software Foundation; All Rights Reserved" are | ||
| 47 | ;; retained in Python alone or in any derivative version prepared by | ||
| 48 | ;; Licensee. | ||
| 49 | ;; | ||
| 50 | ;; 3. In the event Licensee prepares a derivative work that is based | ||
| 51 | ;; on or incorporates Python or any part thereof, and wants to make | ||
| 52 | ;; the derivative work available to others as provided herein, then | ||
| 53 | ;; Licensee hereby agrees to include in any such work a brief summary | ||
| 54 | ;; of the changes made to Python. | ||
| 55 | ;; | ||
| 56 | ;; 4. PSF is making Python available to Licensee on an "AS IS" | ||
| 57 | ;; basis. PSF MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR | ||
| 58 | ;; IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, PSF MAKES NO AND | ||
| 59 | ;; DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS | ||
| 60 | ;; FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON WILL NOT | ||
| 61 | ;; INFRINGE ANY THIRD PARTY RIGHTS. | ||
| 31 | ;; | 62 | ;; |
| 63 | ;; 5. PSF SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON | ||
| 64 | ;; FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS A | ||
| 65 | ;; RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON, OR | ||
| 66 | ;; ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF. | ||
| 67 | ;; | ||
| 68 | ;; 6. This License Agreement will automatically terminate upon a | ||
| 69 | ;; material breach of its terms and conditions. | ||
| 70 | ;; | ||
| 71 | ;; 7. Nothing in this License Agreement shall be deemed to create any | ||
| 72 | ;; relationship of agency, partnership, or joint venture between PSF | ||
| 73 | ;; and Licensee. This License Agreement does not grant permission to | ||
| 74 | ;; use PSF trademarks or trade name in a trademark sense to endorse or | ||
| 75 | ;; promote products or services of Licensee, or any third party. | ||
| 76 | ;; | ||
| 77 | ;; 8. By copying, installing or otherwise using Python, Licensee | ||
| 78 | ;; agrees to be bound by the terms and conditions of this License | ||
| 79 | ;; Agreement. | ||
| 80 | |||
| 32 | ;;; To do: | 81 | ;;; To do: |
| 33 | ;; | 82 | ;; |
| 34 | ;; * Verify that semantic-lex-python-number regexp is correct. | 83 | ;; * Verify that semantic-lex-python-number regexp is correct. |
| @@ -1080,4 +1129,4 @@ semicolon_opt | |||
| 1080 | | SEMICOLON | 1129 | | SEMICOLON |
| 1081 | ; | 1130 | ; |
| 1082 | 1131 | ||
| 1083 | ;;; semantic/wisent/python.wy ends here | 1132 | ;;; python.wy ends here |