-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathlea_help.txt
154 lines (127 loc) · 5.68 KB
/
lea_help.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
================
LEA's Quick help
================
This quick help consists in few random notes about LEA
functionalities that are not self-explanatory from the menus.
Windows
=======
LEA is a multi-window application. Each editor window is embedded
in the main window. You can switch windows with Ctrl-Tab or via the
Window menu.
Installation
============
LEA is a portable application in the sense that it runs without needing
to be installed. However, you can install it, typically in the
folder C:\Program Files\LEA if you want. Conversely, if you want to use
LEA and leave the least traces on the host PC, including its registry
(typically you would also run LEA from a USB stick), you can create a file
called `lea.cfg` beside `lea.exe`. Then, LEA will run in "stealth mode"
and the options, windows sizes and recent file names will be then stored
in that file.
Display
=======
Highlighting of occurrences of selected strings
===============================================
You will notice that when you select a portion of text, occurrences
of that text will be highlighted as well. There are a few rules about
this algorithm:
- when a whole word is marked, only identical whole words are
highlighted; this is for showing identical identifiers only
- the feature is disabled automatically on selections spanning over
multiple lines
- the highlighting is performed only in a region of a few hundreds
of lines around the selection, in order to avoid time
overconsumption issues on very large texts
Editing
=======
Multi-line editing & rectangular selection using the Alt Key
============================================================
LEA provides a very convenient feature that is not linked to a
specific menu command or button: the multi-line editing.
If you press the Alt key, then select any piece of text
with the mouse, you'll notice the following:
- the cursor spans vertically on all lines concerned by the selection
- a rectangle of text is selected instead of the full
text between the position when the button was pushed down
and the current mouse pointer position
- any typing occurs on all concerned lines.
This is extremely useful for adjusting indentation within lines,
removing contents within a rectangle, or typing contents on a range
of lines. It can for instance be used for transforming an enumeration
into a case statement, by typing "when " and "=>" on all different cases;
or add ":= " in a record for adding initializations, or many situations
where a "Find & Replace" operation, with some guess-work, trial & error and
manual adjustments would be used instead.
Integration with GNAT Studio
============================
Can be set as External Editor for GNAT Studio.
Here is how to configure GNAT Studio.
1) Menu "Edit" -> "Preferences...";
2) From there: "Editor", at bottom: "External Editors"
"External Editor": custom
"Custom editor command: "[path]\lea.exe +%l %f"
The "+%l" parameter will scroll the LEA editor window
to the appropriate line.
Updates
=======
New versions of LEA can be downloaded @
http://l-e-a.sf.net/ (Sources and binaries)
or
https://github.com/zertovitch/lea (Sources only)
Running small programs with HAC (the HAC Ada Compiler)
======================================================
LEA embeds a small Ada compiler (HAC) that allows you to
run and test prototypes, algorithms, script-like, funny or
serious programs, in a quick build--run--change cycle.
No need to wait for lengthy compile, bind, link times: with HAC,
all of this is done in a few milliseconds.
Press F4 for build only;
Press F9 for build and run - that's it!
HAC Examples
============
You'll find examples in the "exm" directory of the HAC project (Web link below).
Notably:
hello.adb
ackermann.adb
anti_primes.adb
arguments.adb
barnes.adb
days_1901.adb
doors.adb
env.adb
file_copy.adb
file_read.adb
mandelbrot.adb
maze_gen.adb
merge_sort.adb
shell.adb
shell_sort.adb
strings_demo.adb
three_lakes_s.adb
Note: a part of those examples are also embedded within LEA.
So you don't need to browse the HAC project or download anything.
From LEA's menu bar, choose the "Action" menu, then the "Code sample" entry.
A box with samples and their description will appear.
HAC's Scope
===========
The available Ada language subset supported by HAC is so far, roughly,
the "Pascal subset", plus tasking, plus packages, less pointers.
From a different perspective, HAC supports Ada 83, less pointers, less generics,
less unconstrained types, plus a few items from Ada 95 and 2005.
Recursion and nested subprograms are supported.
HAT
===
HAC has a general-purpose built-in package called HAT (HAC Ada Toolbox).
The package HAT contains useful types and subprograms for text I/O,
string manipulation, timing, system (calls, arguments, environment variables, ...),
and some mathematical functions.
The HAT package is embedded in HAC, which is itself embedded in LEA.
For ensuring compatibility with other Ada compilers and for the
good understanding of HAT, a *real* Ada implementation of HAT is
available from LEA.
Choose the "Action" menu, then the "Code sample" entry,
then the "HAT package - compatibility" Topic choice.
The same files (hat.ads and hat*.adb) are also available @
http://hacadacompiler.sf.net/ (see Download or Code)
or
https://github.com/zertovitch/hac