/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. --
  15. class LIBERTY_INTERPRETER_DEBUGGER_GRAMMAR
  16. inherit
  17. EIFFEL_GRAMMAR
  18. redefine
  19. the_table
  20. end
  21. create {LIBERTY_INTERPRETER_DEBUGGER}
  22. make
  23. feature {}
  24. the_table: PARSE_TABLE is
  25. once
  26. Result := {PARSE_TABLE << "Entry", {PARSE_NON_TERMINAL << {FAST_ARRAY[STRING] << "KW show", "Show", "KW end of line" >> }, agent build_root;
  27. {FAST_ARRAY[STRING] << "KW up", "Up" >> }, agent build_root;
  28. {FAST_ARRAY[STRING] << "KW down", "Down" >> }, agent build_root;
  29. {FAST_ARRAY[STRING] << "KW continue", "KW end of line" >> }, agent build_root;
  30. {FAST_ARRAY[STRING] << "KW step", "Step", "KW end of line" >> }, agent build_root;
  31. {FAST_ARRAY[STRING] << "KW quit", "KW end of line" >> }, agent build_root >> };
  32. "Show", {PARSE_NON_TERMINAL << {FAST_ARRAY[STRING] << "KW stack" >> }, Void;
  33. {FAST_ARRAY[STRING] << "KW frame" >> }, Void >> };
  34. "Step", {PARSE_NON_TERMINAL << epsilon, Void;
  35. {FAST_ARRAY[STRING] << "KW in" >> }, Void;
  36. {FAST_ARRAY[STRING] << "KW out" >> }, Void;
  37. {FAST_ARRAY[STRING] << "KW number" >> }, Void >> };
  38. "Up", {PARSE_NON_TERMINAL << epsilon, Void;
  39. {FAST_ARRAY[STRING] << "KW number" >> }, Void >> };
  40. "Down", {PARSE_NON_TERMINAL << epsilon, Void;
  41. {FAST_ARRAY[STRING] << "KW number" >> }, Void >> };
  42. "KW continue", create {PARSE_TERMINAL}.make(agent parse_keyword(?, "continue"), Void);
  43. "KW down", create {PARSE_TERMINAL}.make(agent parse_keyword(?, "down"), Void);
  44. "KW frame", create {PARSE_TERMINAL}.make(agent parse_keyword(?, "frame"), Void);
  45. "KW in", create {PARSE_TERMINAL}.make(agent parse_keyword(?, "in"), Void);
  46. "KW out", create {PARSE_TERMINAL}.make(agent parse_keyword(?, "out"), Void);
  47. "KW quit", create {PARSE_TERMINAL}.make(agent parse_keyword(?, "quit"), Void);
  48. "KW show", create {PARSE_TERMINAL}.make(agent parse_keyword(?, "show"), Void);
  49. "KW stack", create {PARSE_TERMINAL}.make(agent parse_keyword(?, "stack"), Void);
  50. "KW step", create {PARSE_TERMINAL}.make(agent parse_keyword(?, "step"), Void);
  51. "KW up", create {PARSE_TERMINAL}.make(agent parse_keyword(?, "up"), Void);
  52. "KW number", create {PARSE_TERMINAL}.make(agent parse_number, Void);
  53. "KW end of line", create {PARSE_TERMINAL}.make(agent parse_end, Void) >> };
  54. end
  55. end -- class LIBERTY_INTERPRETER_DEBUGGER_GRAMMAR