Lugaru's Epsilon
Programmer's
Editor 14.04

Context:
Epsilon User's Manual and Reference
   Commands by Topic
      . . .
      Simple Customizing
         Bindings
         Brief Emulation
         CUA Keyboard
         . . .
         Command Files
      Advanced Topics
         Changing Commands with EEL
         Updating from an Old Version
         Keys and their Representation
         . . .
      Miscellaneous

Previous   Up    Next
Building Command Files  Commands by Topic   Updating from an Old Version


Epsilon User's Manual and Reference > Commands by Topic > Advanced Topics >

Changing Commands with EEL

Epsilon has many built-in commands, but you may want to add new commands, or modify the way some commands work. We used a language called EEL to write all of Epsilon's commands. You can find the EEL definitions to all of Epsilon's commands in files ending in ".e". EEL stands for Epsilon Extension Language.

Before you can load a group of commands from a ".e" file into Epsilon, you must compile them with the EEL compiler. You do this (outside of Epsilon, or in Epsilon's concurrent process buffer) by giving the command "eel filename" where filename specifies the name of the ".e" file you wish to compile (with or without the ".e"). The EEL compiler will read the source file and, if it finds no errors, will produce a "bytecode" file with the same first name but with a ".b" extension. A bytecode file contains command, subroutine, and variable definitions from the source file translated to a binary form that Epsilon can understand. It's similar to a regular compiler's object file.

Once you've compiled the file, the Epsilon load-bytes command gets it into Epsilon. This command prompts for a file name, then loads it into Epsilon. You may omit the extension. But an easier method is to load the EEL source file, then compile and load it in one step using the compile-buffer command on Alt-F3. See Compiling From Epsilon.

Often a new EEL command won't work the first time. Epsilon incorporates a simple debugger to help you trace through the execution of a command. It provides single-stepping by source line, and you can enter a recursive edit level to locate point, display the values of global variables, or run test functions. The debugger takes the following commands:

<Space>
Step to the next line. This command will trace a function call only if you have enabled debugging for that function.

S
If the current line calls a function, step to its first line. Otherwise, step to the current function's next line.

G
Cancel debugging for the rest of this function call and let the function run. Resume debugging if someone calls the current function again.

R
Begin a recursive edit of the current buffer. You may execute any command, including show-variable or set-variable. Ctrl-x Ctrl-z resumes debugging the stopped function. (When debugging a function doing input, you may need to type Ctrl-u Ctrl-x Ctrl-z to resume debugging.)

T
Toggle whether or not the current function should start the debugger when called the next time. Parentheses appear around the word "Debug" in the debug status line to indicate that you have not enabled debugging for the current function.

+
Enlarge the debug window.

-
Shrink the debug window.

?
List all debugger commands.

To start the debugger, use the set-debug command. It asks for the name of a command or subroutine, providing completion, and toggles debugging for that function. (A zero numeric argument turns off debugging for that function. A nonzero numeric argument turns it on. Otherwise, it toggles.) The list-debug command shows which functions have had debugging set.

Compiling a file with the -s EEL compiler flag disables debugging for routines defined in that file. See EEL Command Line Flags for information about the EEL command line options, including the -s flag.

The profile command shows where a command spends its time. When you invoke the profile command, it starts a recursive edit level, and collects timing information. Many times each second, Epsilon notes the source file and source line of the EEL code then executing. When you exit from the recursive edit with Ctrl-x Ctrl-z, Epsilon displays the information to you in a buffer.

Epsilon doesn't collect any profiling information on commands or subroutines that you compile with the -s EEL flag.

The list-undefined command makes a list of EEL functions that are called from some other EEL function, but have no definition. These are typically the result of misspelled function names.

Standard bindings:

    load-bytes
   set-debug
   profile
   list-undefined
 



Previous   Up    Next
Building Command Files  Commands by Topic   Updating from an Old Version


Lugaru Epsilon Programmer's Editor 14.04 manual. Copyright (C) 1984, 2021 by Lugaru Software Ltd. All rights reserved.