PageRenderTime 18ms CodeModel.GetById 13ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/src/tools/interpreter/debugger/liberty_interpreter_debugger_grammar.e

http://github.com/tybor/Liberty
Specman e | 62 lines | 41 code | 7 blank | 14 comment | 0 complexity | 80b5706db066de55fd9597a458c33320 MD5 | raw file
 1-- This file is part of Liberty Eiffel.
 2--
 3-- Liberty Eiffel is free software: you can redistribute it and/or modify
 4-- it under the terms of the GNU General Public License as published by
 5-- the Free Software Foundation, version 3 of the License.
 6--
 7-- Liberty Eiffel is distributed in the hope that it will be useful,
 8-- but WITHOUT ANY WARRANTY; without even the implied warranty of
 9-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
10-- GNU General Public License for more details.
11--
12-- You should have received a copy of the GNU General Public License
13-- along with Liberty Eiffel.  If not, see <http://www.gnu.org/licenses/>.
14--
15class LIBERTY_INTERPRETER_DEBUGGER_GRAMMAR
16
17inherit
18   EIFFEL_GRAMMAR
19      redefine
20         the_table
21      end
22
23create {LIBERTY_INTERPRETER_DEBUGGER}
24   make
25
26feature {}
27   the_table: PARSE_TABLE is
28      once
29         Result := {PARSE_TABLE << "Entry", {PARSE_NON_TERMINAL << {FAST_ARRAY[STRING] << "KW show", "Show", "KW end of line" >> }, agent build_root;
30                                                                   {FAST_ARRAY[STRING] << "KW up", "Up" >> }, agent build_root;
31                                                                   {FAST_ARRAY[STRING] << "KW down", "Down" >> }, agent build_root;
32                                                                   {FAST_ARRAY[STRING] << "KW continue", "KW end of line" >> }, agent build_root;
33                                                                   {FAST_ARRAY[STRING] << "KW step", "Step", "KW end of line" >> }, agent build_root;
34                                                                   {FAST_ARRAY[STRING] << "KW quit", "KW end of line" >> }, agent build_root >> };
35                                   "Show", {PARSE_NON_TERMINAL << {FAST_ARRAY[STRING] << "KW stack" >> }, Void;
36                                                                  {FAST_ARRAY[STRING] << "KW frame" >> }, Void >> };
37                                   "Step", {PARSE_NON_TERMINAL << epsilon, Void;
38                                                                  {FAST_ARRAY[STRING] << "KW in" >> }, Void;
39                                                                  {FAST_ARRAY[STRING] << "KW out" >> }, Void;
40                                                                  {FAST_ARRAY[STRING] << "KW number" >> }, Void >> };
41                                   "Up", {PARSE_NON_TERMINAL << epsilon, Void;
42                                                                {FAST_ARRAY[STRING] << "KW number" >> }, Void >> };
43                                   "Down", {PARSE_NON_TERMINAL << epsilon, Void;
44                                                                  {FAST_ARRAY[STRING] << "KW number" >> }, Void >> };
45
46                                   "KW continue",    create {PARSE_TERMINAL}.make(agent parse_keyword(?, "continue"), Void);
47                                   "KW down",        create {PARSE_TERMINAL}.make(agent parse_keyword(?, "down"),    Void);
48                                   "KW frame",       create {PARSE_TERMINAL}.make(agent parse_keyword(?, "frame"),    Void);
49                                   "KW in",          create {PARSE_TERMINAL}.make(agent parse_keyword(?, "in"),       Void);
50                                   "KW out",         create {PARSE_TERMINAL}.make(agent parse_keyword(?, "out"),      Void);
51                                   "KW quit",        create {PARSE_TERMINAL}.make(agent parse_keyword(?, "quit"),     Void);
52                                   "KW show",        create {PARSE_TERMINAL}.make(agent parse_keyword(?, "show"),     Void);
53                                   "KW stack",       create {PARSE_TERMINAL}.make(agent parse_keyword(?, "stack"),    Void);
54                                   "KW step",        create {PARSE_TERMINAL}.make(agent parse_keyword(?, "step"),     Void);
55                                   "KW up",          create {PARSE_TERMINAL}.make(agent parse_keyword(?, "up"),    Void);
56
57                                   "KW number",      create {PARSE_TERMINAL}.make(agent parse_number, Void);
58
59                                   "KW end of line", create {PARSE_TERMINAL}.make(agent parse_end, Void) >> };
60      end
61
62end -- class LIBERTY_INTERPRETER_DEBUGGER_GRAMMAR