mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-19 19:33:46 +00:00
Estimated hours taken: 1000 Add Opium-M in the extras. (committed on behalf of Erwan Jahier). extras/opium_m/copyright.txt: The copyright for Opium-M. extras/opium_m/VERSION: extras/opium_m/README: extras/opium_m/opium-mode.el: An emacs mode designed to write opium scenario. extras/opium_m/INSTALL-OPIUM-M: Opium-M installation script. extras/opium_m/source/interactive_queries.op: extras/opium_m/source/browse.op: extras/opium_m/source/control_flow.op: extras/opium_m/source/coprocess_M.op: extras/opium_m/source/opium_kernel_M.op: extras/opium_m/source/current_arg_M.op: extras/opium_m/source/current_slots_M.op: extras/opium_m/source/display_M.op: extras/opium_m/source/source_M.op: extras/opium_m/source/event_attributes_M.op: extras/opium_m/source/step_by_step_M.op: extras/opium_m/source/exec_control_M.op: extras/opium_m/source/forward_move_M.op: extras/opium_m/source/load_Opium-M.pl: extras/opium_m/source/make_scenario-M.pl: extras/opium_m/source/load_Opium-M_without_banner.pl: extras/opium_m/source/load_scenario-M.pl: The Opium-M source files. extras/opium_m/source/partch.autoload: extras/opium_m/source/partch.interface: extras/opium_m/source/partch.parameter: extras/opium_m/source/partch.scenario_handler: extras/opium_m/source/partch.error: extras/opium_m/source/partch.types: extras/opium_m/source/partch.translate: extras/opium_m/source/partch.util.pl: extras/opium_m/source/partch.make: extras/opium_m/source/partch.scenario: Patches to create the scenario handler for Opium-M. autoload.op, etc. are part of the Eclipse distribution; to avoid licensing issues, we copy thoses files from the Eclipse installation directory during the installation and then we patch them using those files. extras/opium_m/non-regression-tests/*: Non regression tests for Opium-M. extras/opium_m/non-regression-tests/queens.m: extras/opium_m/non-regression-tests/test_vars.m: extras/opium_m/non-regression-tests/test_listing.m: Mercury files that are tested. extras/opium_m/non-regression-tests/browse.in: extras/opium_m/non-regression-tests/queens.in: extras/opium_m/non-regression-tests/test_vars.in: Input of the non regression tests. extras/opium_m/non-regression-tests/queens.exp: extras/opium_m/non-regression-tests/test_vars.exp: extras/opium_m/non-regression-tests/listing_output.exp: Expected output of the non regression tests. extras/opium_m/non-regression-tests/runtests: extras/opium_m/non-regression-tests/Mmakefile: To perform the non regression tests. extras/opium_m/non-regression-tests/Mmake.common: extras/opium_m/non-regression-tests/shutdown: extras/opium_m/non-regression-tests/startup: extras/opium_m/non-regression-tests/handle_options: Those files are copied from the Mercury tests repository. extras/opium_m/scripts/exec_mercury_program: Script that is used to run Mercury programs under the control of Opium-M. extras/opium_m/scripts/fixmanual: Script that patch the output of `manual' command (which automaticly generates the Opium-M Reference Manual).
214 lines
8.3 KiB
EmacsLisp
214 lines
8.3 KiB
EmacsLisp
;------------------------------------------------------------------------------;
|
|
; Copyright (C) 1999 INRIA/INSA.
|
|
;
|
|
; Author : Mireille Ducassé <ducasse@irisa.fr>
|
|
;
|
|
; opium mode to help to declare opium's objects
|
|
|
|
(defun opium-mode ()
|
|
(interactive)
|
|
(setq mode-name "opium-mode")
|
|
)
|
|
|
|
|
|
(defun scenario ()
|
|
(interactive)
|
|
(end-of-line)
|
|
(insert-string "\nopium_scenario(\n")
|
|
(insert-string
|
|
(concat "\tname\t\t: "
|
|
(read-string "Name ? ")
|
|
",\n"))
|
|
(insert-string
|
|
(concat "\tfiles\t\t: ["
|
|
(read-string "Source Files, included the current file ? (separate with ',') ")
|
|
"],\n"))
|
|
(insert-string
|
|
(concat "\tscenarios\t: ["
|
|
(read-string "Further scenarios needed to run the actual one ? (separate with ',') ")
|
|
"],\n"))
|
|
(insert-string
|
|
(concat "\tmessage\t\t:\n\""
|
|
(read-string " Help Message ? ")
|
|
"\"\n"))
|
|
(insert-string "\t).\n")
|
|
(message "opium_scenario defined"))
|
|
|
|
|
|
(defun command ()
|
|
(interactive)
|
|
(insert-string "\nopium_command(\n")
|
|
(insert-string
|
|
(concat "\tname\t\t: "
|
|
(read-string "Name ? ")
|
|
",\n"))
|
|
(insert-string
|
|
(concat "\targ_list\t: ["
|
|
(read-string "Arguments ? (separate with ',') ")
|
|
"],\n"))
|
|
(insert-string
|
|
(concat "\targ_type_list\t: ["
|
|
(read-string "Argument Types ? (separate with ',') ")
|
|
"],\n"))
|
|
(insert-string
|
|
(concat "\tabbrev\t\t: "
|
|
(read-string "Abbrev ? (no arguments, '_' if no abbrev) ")
|
|
",\n"))
|
|
(insert-string
|
|
(concat "\tinterface\t: "
|
|
(read-string "Interface ? (button/menu/hidden) ")
|
|
",\n"))
|
|
(insert-string
|
|
(concat "\tcommand_type\t: "
|
|
(read-string "Command type ? (trace/opium/tool) ")
|
|
",\n"))
|
|
(insert-string
|
|
(concat "\timplementation\t: "
|
|
(read-string "Name of the implementation ? ")
|
|
",\n"))
|
|
(insert-string
|
|
(concat "\tparameters\t: ["
|
|
(read-string "Related Parameters ? (separate with ',') ")
|
|
"],\n"))
|
|
(insert-string
|
|
(concat "\tmessage\t\t:\n\""
|
|
(read-string "Help Message ? ")
|
|
"\"\n"))
|
|
(insert-string "\t).\n")
|
|
(message "opium_command defined"))
|
|
|
|
|
|
(defun primitive ()
|
|
(interactive)
|
|
(insert-string "\nopium_primitive(\n")
|
|
(insert-string
|
|
(concat "\tname\t\t: "
|
|
(read-string "Name ? ")
|
|
",\n"))
|
|
(insert-string
|
|
(concat "\targ_list\t: ["
|
|
(read-string "Arguments ? (separate with ',') ")
|
|
"],\n"))
|
|
(insert-string
|
|
(concat "\targ_type_list\t: ["
|
|
(read-string "Argument Types ? (separate with ',') ")
|
|
"],\n"))
|
|
(insert-string
|
|
(concat "\tabbrev\t\t: "
|
|
(read-string "Abbrev ? (no arguments) ")
|
|
",\n"))
|
|
(insert-string
|
|
(concat "\timplementation\t: "
|
|
(read-string "Name of the implementation ? ")
|
|
",\n"))
|
|
(insert-string
|
|
(concat "\tmessage\t\t:\n\""
|
|
(read-string "Help Message ? ")
|
|
"\"\n"))
|
|
(insert-string "\t).\n")
|
|
(message "opium_primitive defined"))
|
|
|
|
|
|
(defun procedure ()
|
|
(interactive)
|
|
(insert-string "\nopium_procedure(\n")
|
|
(insert-string
|
|
(concat "\tname\t\t: "
|
|
(read-string "Name ? ")
|
|
",\n"))
|
|
(insert-string
|
|
(concat "\targ_list\t: ["
|
|
(read-string "Arguments ? (separate with ',') ")
|
|
"],\n"))
|
|
(insert-string
|
|
(concat "\timplementation\t: "
|
|
(read-string " Name of the implementation ? ")
|
|
",\n"))
|
|
(insert-string
|
|
(concat "\tparameters\t: ["
|
|
(read-string "Related Parameters ? (separate with ',') ")
|
|
"],\n"))
|
|
(insert-string
|
|
(concat "\tmessage\t\t:\n\""
|
|
(read-string "Help Message ? ")
|
|
"\"\n"))
|
|
(insert-string "\t).\n")
|
|
(message "opium_procedure defined"))
|
|
|
|
|
|
(defun parameter ()
|
|
(interactive)
|
|
(insert-string "\nopium_parameter(\n")
|
|
(insert-string
|
|
(concat "\tname\t\t: "
|
|
(read-string "Name ? ")
|
|
",\n"))
|
|
(insert-string
|
|
(concat "\targ_list\t: ["
|
|
(read-string "Arguments ? (separate with ',') ")
|
|
"],\n"))
|
|
(insert-string
|
|
(concat "\targ_type_list\t: ["
|
|
(read-string "Argument Types ? (separate with ',') ")
|
|
"],\n"))
|
|
(insert-string
|
|
(concat "\tparameter_type\t: "
|
|
(read-string "Parameter type ? (single/multiple) ")
|
|
",\n"))
|
|
(insert-string
|
|
(concat "\tdefault\t\t: ["
|
|
(read-string "Default Value of the Arguments ? (separate with ',') ")
|
|
"],\n"))
|
|
(insert-string
|
|
(concat "\tcommands\t: ["
|
|
(read-string "Related Commands ? (separate with ',') ")
|
|
"],\n"))
|
|
(insert-string
|
|
(concat "\tmessage\t\t: \n\""
|
|
(read-string "Help Message ? ")
|
|
"\"\n"))
|
|
(insert-string "\t).\n")
|
|
(message "opium_parameter defined"))
|
|
|
|
|
|
(defun type ()
|
|
(interactive)
|
|
(insert-string "\nopium_type(\n")
|
|
(insert-string
|
|
(concat "\tname\t\t: "
|
|
(read-string "Name ? ")
|
|
",\n"))
|
|
(insert-string
|
|
(concat "\timplementation\t: "
|
|
(read-string " Name of the implementation ? ")
|
|
",\n"))
|
|
(insert-string
|
|
(concat "\tmessage\t\t: \n\""
|
|
(read-string "Help Message ? ")
|
|
"\"\n"))
|
|
(insert-string "\t).\n")
|
|
(message "opium_type defined"))
|
|
|
|
|
|
(defun demo ()
|
|
(interactive)
|
|
(insert-string "\nopium_demo(\n")
|
|
(insert-string
|
|
(concat "\tname\t\t: "
|
|
(read-string "Name ? ")
|
|
",\n"))
|
|
(insert-string
|
|
(concat "\tdemo_goal\t: ("
|
|
(read-string " Goals to be used for the demo? (separate with ',') ")
|
|
"),\n"))
|
|
(insert-string
|
|
(concat "\tcondition\t: ("
|
|
(read-string " Conditions/initialisation for the demo goal? (separate with ',') ")
|
|
"),\n"))
|
|
(insert-string
|
|
(concat "\tmessage\t\t: \n\""
|
|
(read-string "Help Message ? ")
|
|
"\"\n"))
|
|
(insert-string "\t).\n")
|
|
(message "opium_demo defined"))
|