Pressing the question mark (?) enters Code Menu Mode, in which a menu of available context-sensitive options is displayed. Selecting an option may bring up another, lower-level menu, which may lead to yet another lower-level menu, and so on.
Code Menu Commands
A popup menu above or below text cursor (and including text cursor) is displayed. The contents of this menu include all valid code elements in the context of the text cursor (ignoring anything after the text cursor). If the current menu item refers to a list, the entire list is highlighted (defaults to light gray if background color of whitespace is white).
· Question Mark - toggle between Code Menu and Free Form/Structure Editor modes
· Esc - show/hide code menu
· Up Arrow - move selection up (scroll up after pressing Esc)
· Down Arrow - move selection down (scroll down after pressing Esc)
· Left Arrow - go to parent code menu
· Right Arrow - go to lower-level code menu, if any
· Enter - go to lower-level code menu (if none, insert current menu item, go to next menu item, or if none, go to parent code menu)
· Space - go to lower-level code menu (if none, insert current menu item, go to next menu item, or if none, go to parent code menu; exit Code Menu mode)
· Printable Char. - incrementally select matching menu item
· Backspace - undo operation of previous printable char.
· Page Up - page up after pressing Esc
· Page Down - page down after pressing Esc
· Shift Arrow – only used if current menu item is repeated, such as a statement in a block, a declaration, or a parameter in a parameter list
· Shift Up Arrow – select previous instance of current menu item
· Shift Down Arrow - select next instance of current menu item
· Shift Left Arrow – insert above current menu item
· Shift Right Arrow - insert below current menu item
· Semicolon – toggle parent list: multi-line/single-line
Code Menus
Each menu is preceded by a menu name, followed by a colon (:). A menu line enclosed in square brackets ([]) is optional. If all menu lines are preceded by a vertical bar (|), then the user must select exactly one of those menu lines. A menu line followed by an asterisk (*) may be repeated one or more times (or zero or more times if also enclosed in square brackets).
A menu line followed by a semicolon (;) is similar to an asterisk, but when the parent menu is expanded into a list, all items of that list are delimited with semicolons, and the list defaults to multi-line mode. A menu line followed by 2 semicolons (;;) means that when the parent menu is expanded into a list, that list defaults to single-line mode, delimited with semicolons (currently a parameter list is the only example of the double-semicolon in the following grammar).
A menu line not enclosed in angle brackets (<>) is a terminal symbol (no further submenus exist). Terminal symbols are often in bold.
<unit>:
[<pkg line>]
[<import line>]*
<class interf def>*
<pkg line>:
package
<pkg list>
<pkg list>:
| <pkg name>
| <pkg name list>
<pkg name list>:
(
<pkg name>*
)
<import line>:
import
<import list>
<import list>:
| <import class>
| <import interf>
| <import all>
<import class>:
(
<pkg name>*
<class name>
)
<import interf>:
(
<pkg name>*
<interf name>
)
<import all>:
(
<pkg name>*
*
)
<class interf def>:
| <class def>
| <interf def>
<class def>:
(
class
[<class modif list>]
<class name>
[<extends clause>]
[<implements clause>]
<class body>
)
<interf def>:
(
interface
[( public )]
<interf name>
[<extends interf clause>]
<interf body>
)
<class modif list>:
(
<class modif>
)
<class modif>:
| public
| public abstract
| public final
| abstract
| final
<class name>:
| <cls name>
| <cls list>
<cls list>:
(
<pkg name>*
<cls name>
)
<interf name>:
| <int name>
| <int list>
<int list>:
(
<pkg name>*
<int name>
)
<extends clause>:
extends
<class name>
<extends interf clause>:
extends
(
<interf name>*
)
<implements clause>:
implements
(
<interf name>*
)
<class body>:
[<field var list>]*
[<stat obj init>]
<method def>*
<interf body>:
[<field var list>]*
<method hdr>*
<method def>:
| <proc def>
| <func def>
| <cons def>
| <event handler>
<proc def>:
(
proc
[<modifier list>]
<method name>
[<parm list>]
[<throws clause>]
[<loc var list>]*
<do with>
<block>
)
<func def>:
(
func
[<modifier list>]
<type>
<method name>
[<parm list>]
[<throws clause>]
[<loc var list>]*
<do with>
<block>
)
<cons def>:
(
cons
[<modifier list>]
<class name>
[<parm list>]
[<throws clause>]
[<loc var list>]*
<do with>
<block>
)
<event handler>:
(
proc ( auto )
<method name>
(
<event class name>
<id>
)
[<throws clause>]
[<loc var list>]*
<do with>
<block>
)
<method hdr>:
| <proc hdr>
| <func hdr>
<proc hdr>:
(
proc
[<modifier list>]
<method name>
[<parm list>]
[<throws clause>]
)
<func hdr>:
(
func
[<modifier list>]
<type>
<method name>
[<parm list>]
[<throws clause>]
)
<throws clause>:
throws
<exception list>
<exception list>:
| <exception>
| <except list>
<except list>:
(
<exception>*
)
<exception>:
<exception class name>
<modifier list>:
(
<modifier>*
)
<modifier>:
| public
| protected
| private
| final
| static
| abstract
| synchronized
| transient
| volatile
<stat obj init>:
| <st obj init>
| <obj st init>
<st obj init>:
<stat init>
[<obj init>]
<obj st init>:
<obj init>
[<stat init>]
<stat init>:
static
<block>
<obj init>:
do
<block>
<parm list>:
(
<parm>;;
)
<parm>:
<type>
<id list>
<id list>:
| <id>
| <id lst>
<id lst>:
(
<id>*
)
<field var list>:
var
[<modifier list>]
(
<field decl>;
)
<loc var list>:
var
[<modifier list>]
(
<loc decl>;
)
<field decl>:
| <fld decl>
| <typedef>
<local decl>:
| <loc decl>
| <typedef>
<fld decl>:
[<modifier list>]
[<property decl>]
<type>
<id list>
[<expr>]
<loc decl>:
[<modifier list>]
<type>
<id list>
[<expr>]
<typedef>:
[<modifier list>]
typedef
<type>
<type name>
<property decl>:
| ( property read )
| ( property write )
| ( property read write )
<type>:
| <simple type>
| <class name>
| <list type>
| <set type>
| <array type>
| <enum type>
<simple type>:
| byte
| short
| int
| long
| float
| double
| char
| boolean
<list type>:
list
[<type>]
<set type>:
set
<set typ>
<set typ>:
| <enum type name>
| <subrange>
<subrange>:
(
..
<ord expr>
<ord expr>
)
<array type>
array
[<dim size>]
<type>
<enum type>
enum
<id lst>
<do with>:
| do
| <with do>
<with do>:
with
<id list>
do
<block>:
(
[<stmt>];
)
<stmt>:
| <if stmt>
| <switch stmt>
| <while stmt>
| <for stmt>
| <with stmt>
| <asst stmt>
| <inc dec stmt>
| <ptr stmt>
| <call stmt>
| <jump stmt>
| <try stmt>
| <throw stmt>
| <synch stmt>
<if stmt>:
if
<bool expr>
then
<block>
[<elseif clause>]*
[<else clause>]
<elseif clause>:
elseif
<bool expr>
then
<block>
<else clause>:
else
<block>
<switch stmt>:
switch
<expr>
(
<case clause>*
[<default clause>]
)
<case clause>:
case
<expr list>
do
<block>
<default clause>:
default
<block>
<while stmt>:
| <while do stmt>
| <do while stmt>
<while do stmt>:
while
<bool expr>
do
<block>
<do while stmt>:
do
<block>
while
<bool expr>
<for stmt>:
for
<id>
<for range>
[<by clause>]
do
<block>
<for range>:
| <for int var>
| <for list var>
<for int var>:
(
<init expr>
<limit expr>
)
<for list var>:
<id>
<by clause>:
by
<step expr>
<init expr>:
<limit expr>:
<step expr>:
<int expr>
<with stmt>:
<with do>
<block>
<asst stmt>:
<asst op>
<var expr>
<expr>
<inc dec stmt>:
<inc dec op>
<var expr>
<ptr stmt>:
<left right op>
<var expr>
<expr>
<call stmt>:
| <proc call>
| <colon call>
<proc call>:
<proc name>
[<expr>]*
<colon call>:
:
<colon head>
[<colon expr>]*
<colon tail>
<colon tail>:
| <proc name>
| <proc call expr>
<proc call expr>:
(
<proc name>
<expr>*
)
<jump stmt>:
| break
| continue
| <return stmt>
<return stmt>:
return
[<expr>]
<try stmt>:
try
<block>
[<catch clause>]*
[<finally clause>]
<catch clause>:
catch
(
<exception id>
<except var name>
)
do
<block>
<finally clause>:
finally
<block>
<throw stmt>:
throw
<throw obj>
<synch stmt>:
synchronized
<obj name>
do
<block>
<expr>:
| <const expr>
| <var expr>
| <op expr>
| <func call>
| <array ref>
| <obj expr>
| <lst expr>
<bool expr>:
<int expr>:
<ord expr>:
<expr>
<var expr>:
| <var name>
| <prop name>
| <array ref>
| <colon var expr>
<colon var expr>:
(
:
<colon head>
[<colon expr>]*
<var end expr>
<var end expr>:
| <prop name>
| <array ref>
<obj expr>:
| <obj name>
| <colon obj expr>
<colon obj expr>:
(
:
<colon head>
<colon expr>*
)
<op expr>:
(
<op>
<expr>*
)
<func call>:
| <func name>
| <func call expr>
<func call expr>:
(
<func name>
<expr>*
)
<array ref>:
| <array name>
| <array expr>
<array expr>:
(
<array name>
<int expr>*
)
<colon head>:
| <obj name>
| <func call>
| <array expr>
<colon expr>:
| <func call>
| <prop name>
| <class name>
| <array ref>
<expr list>:
| <expr>
| <list expr>
<list expr>:
(
<expr>*
)
<lst expr>:
(
list
<expr>*
)
<const expr>:
| <int const>
| <float const>
| <string const>
| <ord const>
| <bool const>
| nil
<asst op>:
| =
| =+
| =-
| =*
| =/
| =%
| =&
| =^
| =<<
| =>>
| =>>>
| =|
<op>:
| +
| -
| *
| /
| %
| &
| ^
| <<
| >>
| >>>
| |
| ==
| <
| <>
| <=
| >
| >=
| not
| and
| or
| xor
| in
| left
| right
| new
| resize
| instanceof
| quest
<inc dec op>:
| ++
| --
<left right op>:
| pchild
| pnext
<bool const>:
| true
| false