Mercurial > emacs
annotate lisp/cedet/semantic/wisent/python-wy.el @ 112426:59f7ce1a78c6
* admin/notes/bzrmerge: Comment on skipped revisions.
author | Glenn Morris <rgm@gnu.org> |
---|---|
date | Sat, 22 Jan 2011 11:44:38 -0800 |
parents | 376148b31b5e |
children |
rev | line source |
---|---|
106783
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
1 ;;; semantic/wisent/python-wy.el --- Generated parser support file |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
2 |
112218
376148b31b5e
Add 2011 to FSF/AIST copyright years.
Glenn Morris <rgm@gnu.org>
parents:
110523
diff
changeset
|
3 ;; Copyright (C) 2002, 2003, 2004, 2007, 2010, 2011 |
106783
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
4 ;; Free Software Foundation, Inc. |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
5 |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
6 ;; This file is part of GNU Emacs. |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
7 |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
8 ;; GNU Emacs is free software: you can redistribute it and/or modify |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
9 ;; it under the terms of the GNU General Public License as published by |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
10 ;; the Free Software Foundation, either version 3 of the License, or |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
11 ;; (at your option) any later version. |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
12 |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
13 ;; GNU Emacs is distributed in the hope that it will be useful, |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
14 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
15 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
16 ;; GNU General Public License for more details. |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
17 |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
18 ;; You should have received a copy of the GNU General Public License |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
19 ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
20 |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
21 ;;; Commentary: |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
22 ;; |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
23 ;; This file was generated from the grammar file |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
24 ;; semantic/wisent/wisent-python.wy in the CEDET repository. |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
25 |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
26 ;;; Code: |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
27 |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
28 (require 'semantic/lex) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
29 |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
30 ;;; Prologue |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
31 ;; |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
32 |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
33 ;;; Declarations |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
34 ;; |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
35 (defconst wisent-python-wy--keyword-table |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
36 (semantic-lex-make-keyword-table |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
37 '(("and" . AND) |
110523
a5ad4f188e19
Synch Semantic to CEDET 1.0.
Chong Yidong <cyd@stupidchicken.com>
parents:
106800
diff
changeset
|
38 ("as" . AS) |
106783
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
39 ("assert" . ASSERT) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
40 ("break" . BREAK) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
41 ("class" . CLASS) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
42 ("continue" . CONTINUE) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
43 ("def" . DEF) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
44 ("del" . DEL) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
45 ("elif" . ELIF) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
46 ("else" . ELSE) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
47 ("except" . EXCEPT) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
48 ("exec" . EXEC) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
49 ("finally" . FINALLY) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
50 ("for" . FOR) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
51 ("from" . FROM) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
52 ("global" . GLOBAL) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
53 ("if" . IF) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
54 ("import" . IMPORT) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
55 ("in" . IN) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
56 ("is" . IS) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
57 ("lambda" . LAMBDA) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
58 ("not" . NOT) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
59 ("or" . OR) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
60 ("pass" . PASS) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
61 ("print" . PRINT) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
62 ("raise" . RAISE) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
63 ("return" . RETURN) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
64 ("try" . TRY) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
65 ("while" . WHILE) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
66 ("yield" . YIELD)) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
67 '(("yield" summary "Create a generator function") |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
68 ("while" summary "Start a 'while' loop") |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
69 ("try" summary "Start of statements protected by exception handlers") |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
70 ("return" summary "Return from a function") |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
71 ("raise" summary "Raise an exception") |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
72 ("print" summary "Print each argument to standard output") |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
73 ("pass" summary "Statement that does nothing") |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
74 ("or" summary "Binary logical 'or' operator") |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
75 ("not" summary "Unary boolean negation operator") |
110523
a5ad4f188e19
Synch Semantic to CEDET 1.0.
Chong Yidong <cyd@stupidchicken.com>
parents:
106800
diff
changeset
|
76 ("lambda" summary "Create anonymous function") |
106783
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
77 ("is" summary "Binary operator that tests for object equality") |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
78 ("in" summary "Part of 'for' statement ") |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
79 ("import" summary "Load specified modules") |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
80 ("if" summary "Start 'if' conditional statement") |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
81 ("global" summary "Declare one or more symbols as global symbols") |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
82 ("from" summary "Modify behavior of 'import' statement") |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
83 ("for" summary "Start a 'for' loop") |
106800
58365d44aeda
Fix typos in CEDET docstrings.
Juanma Barranquero <lekktu@gmail.com>
parents:
106783
diff
changeset
|
84 ("finally" summary "Specify code to be executed after 'try' statements whether or not an exception occurred") |
58365d44aeda
Fix typos in CEDET docstrings.
Juanma Barranquero <lekktu@gmail.com>
parents:
106783
diff
changeset
|
85 ("exec" summary "Dynamically execute Python code") |
106783
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
86 ("except" summary "Specify exception handlers along with 'try' keyword") |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
87 ("else" summary "Start the 'else' clause following an 'if' statement") |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
88 ("elif" summary "Shorthand for 'else if' following an 'if' statement") |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
89 ("del" summary "Delete specified objects, i.e., undo what assignment did") |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
90 ("def" summary "Define a new function") |
110523
a5ad4f188e19
Synch Semantic to CEDET 1.0.
Chong Yidong <cyd@stupidchicken.com>
parents:
106800
diff
changeset
|
91 ("continue" summary "Skip to the next iteration of enclosing 'for' or 'while' loop") |
106783
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
92 ("class" summary "Define a new class") |
106800
58365d44aeda
Fix typos in CEDET docstrings.
Juanma Barranquero <lekktu@gmail.com>
parents:
106783
diff
changeset
|
93 ("break" summary "Terminate 'for' or 'while' loop") |
106783
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
94 ("assert" summary "Raise AssertionError exception if <expr> is false") |
110523
a5ad4f188e19
Synch Semantic to CEDET 1.0.
Chong Yidong <cyd@stupidchicken.com>
parents:
106800
diff
changeset
|
95 ("as" summary "EXPR as NAME makes value of EXPR available as variable NAME") |
106783
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
96 ("and" summary "Logical AND binary operator ... "))) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
97 "Table of language keywords.") |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
98 |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
99 (defconst wisent-python-wy--token-table |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
100 (semantic-lex-make-type-table |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
101 '(("symbol" |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
102 (NAME)) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
103 ("number" |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
104 (NUMBER_LITERAL)) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
105 ("string" |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
106 (STRING_LITERAL)) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
107 ("punctuation" |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
108 (BACKQUOTE . "`") |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
109 (ASSIGN . "=") |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
110 (COMMA . ",") |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
111 (SEMICOLON . ";") |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
112 (COLON . ":") |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
113 (BAR . "|") |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
114 (TILDE . "~") |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
115 (PERIOD . ".") |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
116 (MINUS . "-") |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
117 (PLUS . "+") |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
118 (MOD . "%") |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
119 (DIV . "/") |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
120 (MULT . "*") |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
121 (AMP . "&") |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
122 (GT . ">") |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
123 (LT . "<") |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
124 (HAT . "^") |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
125 (NE . "!=") |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
126 (LTGT . "<>") |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
127 (HATEQ . "^=") |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
128 (OREQ . "|=") |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
129 (AMPEQ . "&=") |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
130 (MODEQ . "%=") |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
131 (DIVEQ . "/=") |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
132 (MULTEQ . "*=") |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
133 (MINUSEQ . "-=") |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
134 (PLUSEQ . "+=") |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
135 (LE . "<=") |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
136 (GE . ">=") |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
137 (EQ . "==") |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
138 (EXPONENT . "**") |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
139 (GTGT . ">>") |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
140 (LTLT . "<<") |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
141 (DIVDIV . "//") |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
142 (DIVDIVEQ . "//=") |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
143 (EXPEQ . "**=") |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
144 (GTGTEQ . ">>=") |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
145 (LTLTEQ . "<<=")) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
146 ("close-paren" |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
147 (RBRACK . "]") |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
148 (RBRACE . "}") |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
149 (RPAREN . ")")) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
150 ("open-paren" |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
151 (LBRACK . "[") |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
152 (LBRACE . "{") |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
153 (LPAREN . "(")) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
154 ("block" |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
155 (BRACK_BLOCK . "(LBRACK RBRACK)") |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
156 (BRACE_BLOCK . "(LBRACE RBRACE)") |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
157 (PAREN_BLOCK . "(LPAREN RPAREN)")) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
158 ("indentation" |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
159 (INDENT_BLOCK . "(INDENT DEDENT)") |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
160 (DEDENT . "[^:INDENT:]") |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
161 (INDENT . "^\\s-+")) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
162 ("newline" |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
163 (NEWLINE . "\n")) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
164 ("charquote" |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
165 (BACKSLASH . "\\"))) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
166 '(("keyword" :declared t) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
167 ("symbol" :declared t) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
168 ("number" :declared t) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
169 ("punctuation" :declared t) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
170 ("block" :declared t))) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
171 "Table of lexical tokens.") |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
172 |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
173 (defconst wisent-python-wy--parse-table |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
174 (progn |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
175 (eval-when-compile |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
176 (require 'semantic/wisent/comp)) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
177 (wisent-compile-grammar |
110523
a5ad4f188e19
Synch Semantic to CEDET 1.0.
Chong Yidong <cyd@stupidchicken.com>
parents:
106800
diff
changeset
|
178 '((BACKSLASH NEWLINE INDENT DEDENT INDENT_BLOCK PAREN_BLOCK BRACE_BLOCK BRACK_BLOCK LPAREN RPAREN LBRACE RBRACE LBRACK RBRACK LTLTEQ GTGTEQ EXPEQ DIVDIVEQ DIVDIV LTLT GTGT EXPONENT EQ GE LE PLUSEQ MINUSEQ MULTEQ DIVEQ MODEQ AMPEQ OREQ HATEQ LTGT NE HAT LT GT AMP MULT DIV MOD PLUS MINUS PERIOD TILDE BAR COLON SEMICOLON COMMA ASSIGN BACKQUOTE STRING_LITERAL NUMBER_LITERAL NAME AND AS ASSERT BREAK CLASS CONTINUE DEF DEL ELIF ELSE EXCEPT EXEC FINALLY FOR FROM GLOBAL IF IMPORT IN IS LAMBDA NOT OR PASS PRINT RAISE RETURN TRY WHILE YIELD) |
106783
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
179 nil |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
180 (goal |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
181 ((NEWLINE)) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
182 ((simple_stmt)) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
183 ((compound_stmt))) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
184 (simple_stmt |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
185 ((small_stmt_list semicolon_opt NEWLINE))) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
186 (small_stmt_list |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
187 ((small_stmt)) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
188 ((small_stmt_list SEMICOLON small_stmt))) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
189 (small_stmt |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
190 ((expr_stmt)) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
191 ((print_stmt)) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
192 ((del_stmt)) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
193 ((pass_stmt)) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
194 ((flow_stmt)) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
195 ((import_stmt)) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
196 ((global_stmt)) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
197 ((exec_stmt)) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
198 ((assert_stmt))) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
199 (print_stmt |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
200 ((PRINT print_stmt_trailer) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
201 (wisent-raw-tag |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
202 (semantic-tag-new-code $1 nil)))) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
203 (print_stmt_trailer |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
204 ((test_list_opt) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
205 nil) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
206 ((GTGT test trailing_test_list_with_opt_comma_opt) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
207 nil)) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
208 (trailing_test_list_with_opt_comma_opt |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
209 (nil) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
210 ((trailing_test_list comma_opt) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
211 nil)) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
212 (trailing_test_list |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
213 ((COMMA test) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
214 nil) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
215 ((trailing_test_list COMMA test) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
216 nil)) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
217 (expr_stmt |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
218 ((testlist expr_stmt_trailer) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
219 (if |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
220 (and $2 |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
221 (stringp $1) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
222 (string-match "^\\(\\sw\\|\\s_\\)+$" $1)) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
223 (wisent-raw-tag |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
224 (semantic-tag-new-variable $1 nil nil)) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
225 (wisent-raw-tag |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
226 (semantic-tag-new-code $1 nil))))) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
227 (expr_stmt_trailer |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
228 ((augassign testlist)) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
229 ((eq_testlist_zom))) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
230 (eq_testlist_zom |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
231 (nil) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
232 ((eq_testlist_zom ASSIGN testlist) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
233 (identity $3))) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
234 (augassign |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
235 ((PLUSEQ)) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
236 ((MINUSEQ)) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
237 ((MULTEQ)) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
238 ((DIVEQ)) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
239 ((MODEQ)) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
240 ((AMPEQ)) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
241 ((OREQ)) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
242 ((HATEQ)) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
243 ((LTLTEQ)) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
244 ((GTGTEQ)) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
245 ((EXPEQ)) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
246 ((DIVDIVEQ))) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
247 (del_stmt |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
248 ((DEL exprlist) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
249 (wisent-raw-tag |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
250 (semantic-tag-new-code $1 nil)))) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
251 (exprlist |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
252 ((expr_list comma_opt) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
253 nil)) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
254 (expr_list |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
255 ((expr) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
256 nil) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
257 ((expr_list COMMA expr) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
258 nil)) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
259 (pass_stmt |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
260 ((PASS) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
261 (wisent-raw-tag |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
262 (semantic-tag-new-code $1 nil)))) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
263 (flow_stmt |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
264 ((break_stmt)) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
265 ((continue_stmt)) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
266 ((return_stmt)) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
267 ((raise_stmt)) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
268 ((yield_stmt))) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
269 (break_stmt |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
270 ((BREAK) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
271 (wisent-raw-tag |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
272 (semantic-tag-new-code $1 nil)))) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
273 (continue_stmt |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
274 ((CONTINUE) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
275 (wisent-raw-tag |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
276 (semantic-tag-new-code $1 nil)))) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
277 (return_stmt |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
278 ((RETURN testlist_opt) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
279 (wisent-raw-tag |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
280 (semantic-tag-new-code $1 nil)))) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
281 (testlist_opt |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
282 (nil) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
283 ((testlist) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
284 nil)) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
285 (yield_stmt |
110523
a5ad4f188e19
Synch Semantic to CEDET 1.0.
Chong Yidong <cyd@stupidchicken.com>
parents:
106800
diff
changeset
|
286 ((YIELD) |
a5ad4f188e19
Synch Semantic to CEDET 1.0.
Chong Yidong <cyd@stupidchicken.com>
parents:
106800
diff
changeset
|
287 (wisent-raw-tag |
a5ad4f188e19
Synch Semantic to CEDET 1.0.
Chong Yidong <cyd@stupidchicken.com>
parents:
106800
diff
changeset
|
288 (semantic-tag-new-code $1 nil))) |
106783
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
289 ((YIELD testlist) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
290 (wisent-raw-tag |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
291 (semantic-tag-new-code $1 nil)))) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
292 (raise_stmt |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
293 ((RAISE zero_one_two_or_three_tests) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
294 (wisent-raw-tag |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
295 (semantic-tag-new-code $1 nil)))) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
296 (zero_one_two_or_three_tests |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
297 (nil) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
298 ((test zero_one_or_two_tests) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
299 nil)) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
300 (zero_one_or_two_tests |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
301 (nil) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
302 ((COMMA test zero_or_one_comma_test) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
303 nil)) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
304 (zero_or_one_comma_test |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
305 (nil) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
306 ((COMMA test) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
307 nil)) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
308 (import_stmt |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
309 ((IMPORT dotted_as_name_list) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
310 (wisent-raw-tag |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
311 (semantic-tag-new-include $2 nil))) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
312 ((FROM dotted_name IMPORT star_or_import_as_name_list) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
313 (wisent-raw-tag |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
314 (semantic-tag-new-include $2 nil)))) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
315 (dotted_as_name_list |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
316 ((dotted_as_name)) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
317 ((dotted_as_name_list COMMA dotted_as_name))) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
318 (star_or_import_as_name_list |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
319 ((MULT) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
320 nil) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
321 ((import_as_name_list) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
322 nil)) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
323 (import_as_name_list |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
324 ((import_as_name) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
325 nil) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
326 ((import_as_name_list COMMA import_as_name) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
327 nil)) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
328 (import_as_name |
110523
a5ad4f188e19
Synch Semantic to CEDET 1.0.
Chong Yidong <cyd@stupidchicken.com>
parents:
106800
diff
changeset
|
329 ((NAME as_name_opt) |
106783
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
330 nil)) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
331 (dotted_as_name |
110523
a5ad4f188e19
Synch Semantic to CEDET 1.0.
Chong Yidong <cyd@stupidchicken.com>
parents:
106800
diff
changeset
|
332 ((dotted_name as_name_opt))) |
a5ad4f188e19
Synch Semantic to CEDET 1.0.
Chong Yidong <cyd@stupidchicken.com>
parents:
106800
diff
changeset
|
333 (as_name_opt |
106783
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
334 (nil) |
110523
a5ad4f188e19
Synch Semantic to CEDET 1.0.
Chong Yidong <cyd@stupidchicken.com>
parents:
106800
diff
changeset
|
335 ((AS NAME) |
a5ad4f188e19
Synch Semantic to CEDET 1.0.
Chong Yidong <cyd@stupidchicken.com>
parents:
106800
diff
changeset
|
336 (identity $2))) |
106783
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
337 (dotted_name |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
338 ((NAME)) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
339 ((dotted_name PERIOD NAME) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
340 (format "%s.%s" $1 $3))) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
341 (global_stmt |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
342 ((GLOBAL comma_sep_name_list) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
343 (wisent-raw-tag |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
344 (semantic-tag-new-code $1 nil)))) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
345 (comma_sep_name_list |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
346 ((NAME)) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
347 ((comma_sep_name_list COMMA NAME))) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
348 (exec_stmt |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
349 ((EXEC expr exec_trailer) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
350 (wisent-raw-tag |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
351 (semantic-tag-new-code $1 nil)))) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
352 (exec_trailer |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
353 (nil) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
354 ((IN test comma_test_opt) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
355 nil)) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
356 (comma_test_opt |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
357 (nil) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
358 ((COMMA test) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
359 nil)) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
360 (assert_stmt |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
361 ((ASSERT test comma_test_opt) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
362 (wisent-raw-tag |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
363 (semantic-tag-new-code $1 nil)))) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
364 (compound_stmt |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
365 ((if_stmt)) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
366 ((while_stmt)) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
367 ((for_stmt)) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
368 ((try_stmt)) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
369 ((funcdef)) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
370 ((class_declaration))) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
371 (if_stmt |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
372 ((IF test COLON suite elif_suite_pair_list else_suite_pair_opt) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
373 (wisent-raw-tag |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
374 (semantic-tag-new-code $1 nil)))) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
375 (elif_suite_pair_list |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
376 (nil) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
377 ((elif_suite_pair_list ELIF test COLON suite) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
378 nil)) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
379 (else_suite_pair_opt |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
380 (nil) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
381 ((ELSE COLON suite) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
382 nil)) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
383 (suite |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
384 ((simple_stmt) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
385 (list $1)) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
386 ((NEWLINE indented_block) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
387 (progn $2))) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
388 (indented_block |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
389 ((INDENT_BLOCK) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
390 (semantic-parse-region |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
391 (car $region1) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
392 (cdr $region1) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
393 'indented_block_body 1))) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
394 (indented_block_body |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
395 ((INDENT) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
396 nil) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
397 ((DEDENT) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
398 nil) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
399 ((simple_stmt)) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
400 ((compound_stmt))) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
401 (while_stmt |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
402 ((WHILE test COLON suite else_suite_pair_opt) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
403 (wisent-raw-tag |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
404 (semantic-tag-new-code $1 nil)))) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
405 (for_stmt |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
406 ((FOR exprlist IN testlist COLON suite else_suite_pair_opt) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
407 (wisent-raw-tag |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
408 (semantic-tag-new-code $1 nil)))) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
409 (try_stmt |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
410 ((TRY COLON suite except_clause_suite_pair_list else_suite_pair_opt) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
411 (wisent-raw-tag |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
412 (semantic-tag-new-code $1 nil))) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
413 ((TRY COLON suite FINALLY COLON suite) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
414 (wisent-raw-tag |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
415 (semantic-tag-new-code $1 nil)))) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
416 (except_clause_suite_pair_list |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
417 ((except_clause COLON suite) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
418 nil) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
419 ((except_clause_suite_pair_list except_clause COLON suite) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
420 nil)) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
421 (except_clause |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
422 ((EXCEPT zero_one_or_two_test) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
423 nil)) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
424 (zero_one_or_two_test |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
425 (nil) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
426 ((test zero_or_one_comma_test) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
427 nil)) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
428 (funcdef |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
429 ((DEF NAME function_parameter_list COLON suite) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
430 (wisent-raw-tag |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
431 (semantic-tag-new-function $2 nil $3)))) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
432 (function_parameter_list |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
433 ((PAREN_BLOCK) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
434 (let |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
435 ((wisent-python-EXPANDING-block t)) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
436 (semantic-parse-region |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
437 (car $region1) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
438 (cdr $region1) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
439 'function_parameters 1)))) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
440 (function_parameters |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
441 ((LPAREN) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
442 nil) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
443 ((RPAREN) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
444 nil) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
445 ((function_parameter COMMA)) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
446 ((function_parameter RPAREN))) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
447 (function_parameter |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
448 ((fpdef_opt_test)) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
449 ((MULT NAME) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
450 (wisent-raw-tag |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
451 (semantic-tag-new-variable $2 nil nil))) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
452 ((EXPONENT NAME) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
453 (wisent-raw-tag |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
454 (semantic-tag-new-variable $2 nil nil)))) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
455 (class_declaration |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
456 ((CLASS NAME paren_class_list_opt COLON suite) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
457 (wisent-raw-tag |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
458 (semantic-tag-new-type $2 $1 $5 |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
459 (cons $3 nil))))) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
460 (paren_class_list_opt |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
461 (nil) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
462 ((paren_class_list))) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
463 (paren_class_list |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
464 ((PAREN_BLOCK) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
465 (let |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
466 ((wisent-python-EXPANDING-block t)) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
467 (mapcar 'semantic-tag-name |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
468 (semantic-parse-region |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
469 (car $region1) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
470 (cdr $region1) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
471 'paren_classes 1))))) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
472 (paren_classes |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
473 ((LPAREN) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
474 nil) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
475 ((RPAREN) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
476 nil) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
477 ((paren_class COMMA) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
478 (wisent-raw-tag |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
479 (semantic-tag-new-variable $1 nil nil))) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
480 ((paren_class RPAREN) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
481 (wisent-raw-tag |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
482 (semantic-tag-new-variable $1 nil nil)))) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
483 (paren_class |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
484 ((dotted_name))) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
485 (test |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
486 ((test_test)) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
487 ((lambdef))) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
488 (test_test |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
489 ((and_test)) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
490 ((test_test OR and_test) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
491 nil)) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
492 (and_test |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
493 ((not_test)) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
494 ((and_test AND not_test) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
495 nil)) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
496 (not_test |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
497 ((NOT not_test) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
498 nil) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
499 ((comparison))) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
500 (comparison |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
501 ((expr)) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
502 ((comparison comp_op expr) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
503 nil)) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
504 (comp_op |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
505 ((LT)) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
506 ((GT)) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
507 ((EQ)) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
508 ((GE)) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
509 ((LE)) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
510 ((LTGT)) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
511 ((NE)) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
512 ((IN)) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
513 ((NOT IN)) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
514 ((IS)) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
515 ((IS NOT))) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
516 (expr |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
517 ((xor_expr)) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
518 ((expr BAR xor_expr) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
519 nil)) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
520 (xor_expr |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
521 ((and_expr)) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
522 ((xor_expr HAT and_expr) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
523 nil)) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
524 (and_expr |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
525 ((shift_expr)) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
526 ((and_expr AMP shift_expr) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
527 nil)) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
528 (shift_expr |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
529 ((arith_expr)) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
530 ((shift_expr shift_expr_operators arith_expr) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
531 nil)) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
532 (shift_expr_operators |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
533 ((LTLT)) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
534 ((GTGT))) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
535 (arith_expr |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
536 ((term)) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
537 ((arith_expr plus_or_minus term) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
538 nil)) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
539 (plus_or_minus |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
540 ((PLUS)) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
541 ((MINUS))) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
542 (term |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
543 ((factor)) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
544 ((term term_operator factor) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
545 nil)) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
546 (term_operator |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
547 ((MULT)) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
548 ((DIV)) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
549 ((MOD)) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
550 ((DIVDIV))) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
551 (factor |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
552 ((prefix_operators factor) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
553 nil) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
554 ((power))) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
555 (prefix_operators |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
556 ((PLUS)) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
557 ((MINUS)) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
558 ((TILDE))) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
559 (power |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
560 ((atom trailer_zom exponent_zom) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
561 (concat $1 |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
562 (if $2 |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
563 (concat " " $2 " ") |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
564 "") |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
565 (if $3 |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
566 (concat " " $3) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
567 "")))) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
568 (trailer_zom |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
569 (nil) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
570 ((trailer_zom trailer) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
571 nil)) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
572 (exponent_zom |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
573 (nil) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
574 ((exponent_zom EXPONENT factor) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
575 nil)) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
576 (trailer |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
577 ((PAREN_BLOCK) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
578 nil) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
579 ((BRACK_BLOCK) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
580 nil) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
581 ((PERIOD NAME) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
582 nil)) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
583 (atom |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
584 ((PAREN_BLOCK) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
585 nil) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
586 ((BRACK_BLOCK) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
587 nil) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
588 ((BRACE_BLOCK) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
589 nil) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
590 ((BACKQUOTE testlist BACKQUOTE) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
591 nil) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
592 ((NAME)) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
593 ((NUMBER_LITERAL)) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
594 ((one_or_more_string))) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
595 (test_list_opt |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
596 (nil) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
597 ((testlist) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
598 nil)) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
599 (testlist |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
600 ((comma_sep_test_list comma_opt))) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
601 (comma_sep_test_list |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
602 ((test)) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
603 ((comma_sep_test_list COMMA test) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
604 (format "%s, %s" $1 $3))) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
605 (one_or_more_string |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
606 ((STRING_LITERAL)) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
607 ((one_or_more_string STRING_LITERAL) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
608 (concat $1 $2))) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
609 (lambdef |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
610 ((LAMBDA varargslist_opt COLON test) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
611 (format "%s %s" $1 |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
612 (or $2 "")))) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
613 (varargslist_opt |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
614 (nil) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
615 ((varargslist))) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
616 (varargslist |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
617 ((fpdef_opt_test_list_comma_zom rest_args) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
618 (nconc $2 $1)) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
619 ((fpdef_opt_test_list comma_opt))) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
620 (rest_args |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
621 ((MULT NAME multmult_name_opt) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
622 nil) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
623 ((EXPONENT NAME) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
624 nil)) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
625 (multmult_name_opt |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
626 (nil) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
627 ((COMMA EXPONENT NAME) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
628 (wisent-raw-tag |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
629 (semantic-tag-new-variable $3 nil nil)))) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
630 (fpdef_opt_test_list_comma_zom |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
631 (nil) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
632 ((fpdef_opt_test_list_comma_zom fpdef_opt_test COMMA) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
633 (nconc $2 $1))) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
634 (fpdef_opt_test_list |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
635 ((fpdef_opt_test)) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
636 ((fpdef_opt_test_list COMMA fpdef_opt_test) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
637 (nconc $3 $1))) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
638 (fpdef_opt_test |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
639 ((fpdef eq_test_opt))) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
640 (fpdef |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
641 ((NAME) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
642 (wisent-raw-tag |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
643 (semantic-tag-new-variable $1 nil nil)))) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
644 (fplist |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
645 ((fpdef_list comma_opt))) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
646 (fpdef_list |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
647 ((fpdef)) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
648 ((fpdef_list COMMA fpdef))) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
649 (eq_test_opt |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
650 (nil) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
651 ((ASSIGN test) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
652 nil)) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
653 (comma_opt |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
654 (nil) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
655 ((COMMA))) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
656 (semicolon_opt |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
657 (nil) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
658 ((SEMICOLON)))) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
659 '(goal function_parameter paren_class indented_block function_parameters paren_classes indented_block_body))) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
660 "Parser table.") |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
661 |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
662 (defun wisent-python-wy--install-parser () |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
663 "Setup the Semantic Parser." |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
664 (semantic-install-function-overrides |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
665 '((parse-stream . wisent-parse-stream))) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
666 (setq semantic-parser-name "LALR" |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
667 semantic--parse-table wisent-python-wy--parse-table |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
668 semantic-debug-parser-source "wisent-python.wy" |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
669 semantic-flex-keywords-obarray wisent-python-wy--keyword-table |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
670 semantic-lex-types-obarray wisent-python-wy--token-table) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
671 ;; Collect unmatched syntax lexical tokens |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
672 (semantic-make-local-hook 'wisent-discarding-token-functions) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
673 (add-hook 'wisent-discarding-token-functions |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
674 'wisent-collect-unmatched-syntax nil t)) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
675 |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
676 |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
677 ;;; Analyzers |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
678 |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
679 (define-lex-keyword-type-analyzer wisent-python-wy--<keyword>-keyword-analyzer |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
680 "keyword analyzer for <keyword> tokens." |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
681 "\\(\\sw\\|\\s_\\)+") |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
682 |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
683 (define-lex-block-type-analyzer wisent-python-wy--<block>-block-analyzer |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
684 "block analyzer for <block> tokens." |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
685 "\\s(\\|\\s)" |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
686 '((("(" LPAREN PAREN_BLOCK) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
687 ("{" LBRACE BRACE_BLOCK) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
688 ("[" LBRACK BRACK_BLOCK)) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
689 (")" RPAREN) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
690 ("}" RBRACE) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
691 ("]" RBRACK)) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
692 ) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
693 |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
694 (define-lex-regex-type-analyzer wisent-python-wy--<symbol>-regexp-analyzer |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
695 "regexp analyzer for <symbol> tokens." |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
696 "\\(\\sw\\|\\s_\\)+" |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
697 nil |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
698 'NAME) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
699 |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
700 (define-lex-regex-type-analyzer wisent-python-wy--<number>-regexp-analyzer |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
701 "regexp analyzer for <number> tokens." |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
702 semantic-lex-number-expression |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
703 nil |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
704 'NUMBER_LITERAL) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
705 |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
706 (define-lex-string-type-analyzer wisent-python-wy--<punctuation>-string-analyzer |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
707 "string analyzer for <punctuation> tokens." |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
708 "\\(\\s.\\|\\s$\\|\\s'\\)+" |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
709 '((BACKQUOTE . "`") |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
710 (ASSIGN . "=") |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
711 (COMMA . ",") |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
712 (SEMICOLON . ";") |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
713 (COLON . ":") |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
714 (BAR . "|") |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
715 (TILDE . "~") |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
716 (PERIOD . ".") |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
717 (MINUS . "-") |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
718 (PLUS . "+") |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
719 (MOD . "%") |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
720 (DIV . "/") |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
721 (MULT . "*") |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
722 (AMP . "&") |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
723 (GT . ">") |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
724 (LT . "<") |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
725 (HAT . "^") |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
726 (NE . "!=") |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
727 (LTGT . "<>") |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
728 (HATEQ . "^=") |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
729 (OREQ . "|=") |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
730 (AMPEQ . "&=") |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
731 (MODEQ . "%=") |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
732 (DIVEQ . "/=") |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
733 (MULTEQ . "*=") |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
734 (MINUSEQ . "-=") |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
735 (PLUSEQ . "+=") |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
736 (LE . "<=") |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
737 (GE . ">=") |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
738 (EQ . "==") |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
739 (EXPONENT . "**") |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
740 (GTGT . ">>") |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
741 (LTLT . "<<") |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
742 (DIVDIV . "//") |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
743 (DIVDIVEQ . "//=") |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
744 (EXPEQ . "**=") |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
745 (GTGTEQ . ">>=") |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
746 (LTLTEQ . "<<=")) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
747 'punctuation) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
748 |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
749 |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
750 ;;; Epilogue |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
751 ;; |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
752 |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
753 (provide 'semantic/wisent/python-wy) |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
754 |
fc2b73c71e0f
Add Semantic parsers for Python.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
755 ;;; semantic/wisent/python-wy.el ends here |