Commit 24924186 authored by Maxime Perrotin's avatar Maxime Perrotin

Adding project files

parent 11ed0fdb
This diff is collapsed.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
OpenGEODE - A tiny, free SDL Editor for TASTE
SDL is the Specification and Description Language (Z100 standard from ITU)
Copyright (c) 2012-2013 European Space Agency
Designed and implemented by Maxime Perrotin
Contact: maxime.perrotin@esa.int
This module is managing the Copy and Paste functions.
"""
import ogAST
import sdlSymbols
import genericSymbols
import logging
import Renderer
import PySide
__all__ = ['copy', 'paste']
LOG = logging.getLogger(__name__)
# Buffer holding the list of copied symbols in AST form
COPY_PASTE = []
# Actual scene clipboard
CLIPBOARD = None
def copy(selection):
''' Create a copy (duplicate) of the selected symbols in AST form '''
# Clear the copy paste buffer
COPY_PASTE[:] = []
branch_top_level = []
floating_items = []
for item in selection:
# When several items are selected, take the first of each subbranch
if item.hasParent and not item.parentItem().grabber.isSelected():
branch_top_level.append(item)
elif not item.hasParent:# and not item.is_singleton:
# Take also floating items //, if they allow for copy (e.g. not START)
floating_items.append(item)
# Check if selected items would allow a paste - reject copy otherwise
# e.g. floating and non-floating items cannot be pasted together
if ((branch_top_level == []) == (floating_items == []) or
len(branch_top_level) > 1):
raise TypeError('Selection is incompatible with copy')
# Then parse/copy the selected branches
for item in branch_top_level + floating_items:
branch_ast, terminators = copy_branch(item)
COPY_PASTE.append((branch_ast, terminators))
LOG.debug('COPY-PASTE LIST:' + str(COPY_PASTE))
def copy_branch(top_level_item):
''' Copy branches (recursively) '''
res_terminators = []
item_ast, terminators = top_level_item.get_ast()
LOG.debug('COPY ' + str(item_ast))
# Set absolute (scene) coordinates of top level item
scene_pos = top_level_item.scenePos()
item_ast.abs_x = scene_pos.x()
item_ast.abs_y = scene_pos.y()
branch = [item_ast]
# If top_level_item is an horizontal symbol, all its children (branch)
# are automatically copied. In the case that several following symbols
# are selected however, the followers of the top_level must be
# explicitely added to the copy list:
if not isinstance(top_level_item, genericSymbols.HorizontalSymbol):
next_aligned = top_level_item.next_aligned_symbol()
while next_aligned and next_aligned.grabber.isSelected():
next_ast, next_terminators = next_aligned.get_ast()
terminators.extend(next_terminators)
branch.append(next_ast)
next_aligned = next_aligned.next_aligned_symbol()
# Parse terminators recursively (e.g. NEXTSTATE)
res_terminators = terminators
for term in terminators:
# Get symbol at terminator coordinates
symbols = top_level_item.scene().items(PySide.QtCore.QRectF
(term.pos_x, term.pos_y, term.width, term.height).center())
for symbol in symbols:
if (isinstance(symbol, sdlSymbols.State) and [c for c in
symbol.childSymbols() if isinstance(c, sdlSymbols.Input)]):
term_branch, term_inators = copy_branch(symbol)
branch.extend(term_branch)
res_terminators.extend(term_inators)
return branch, res_terminators
def paste(parent, scene):
'''
Paste previously copied symbols at selection point
'''
CLIPBOARD.clear()
if not parent:
try:
new_symbols = paste_floating_objects(scene)
except TypeError:
raise
else:
new_symbols = paste_below_item(parent, scene)
return new_symbols
def paste_floating_objects(scene):
''' Paste items with no parents (states, text areas) '''
symbols = []
LOG.debug('PASTING FLOATING OBJECTS')
for item_list, terminators in COPY_PASTE:
# states is a list passed as parameter - not a generator:
start = [i for i in item_list if isinstance(i, ogAST.Start)]
states = [i for i in item_list if isinstance(i, ogAST.State)]
text_areas = (i for i in item_list if isinstance(i, ogAST.TextArea))
labels = (i for i in item_list if isinstance(i, ogAST.Floating_label))
for state in states:
# First check if state has already been pasted
try:
new_item = Renderer.render(state, scene=CLIPBOARD,
terminators=terminators, states=states)
except TypeError:
# Discard terminators (explanation given in Renderer._state)
pass
else:
LOG.debug('PASTE STATE "' + state.inputString + '"')
symbols.append(new_item)
# Insert the new state at click coordinates
scene.addItem(new_item)
for text_area in text_areas:
LOG.debug('PASTE TEXT AREA')
new_item = Renderer.render(text_area, scene)
symbols.append(new_item)
for label in labels:
LOG.debug('PASTE LABEL')
new_item = Renderer.render(label, scene, states=states)
symbols.append(new_item)
if start:
start, = start
LOG.debug('PASTE START')
for item in scene.items():
if isinstance(item, sdlSymbols.Start) and item.isVisible():
raise TypeError('Only one START symbol is possible')
new_item = Renderer.render(start, scene, states=states)
symbols.append(new_item)
return symbols
def paste_below_item(parent, scene):
''' Paste items under a selected symbol '''
LOG.debug('Pasting below item ' + repr(parent)[slice(0,20)])
symbols = []
for item_list, _ in COPY_PASTE:
states = [i for i in item_list if isinstance(i, ogAST.State)]
for i in [c for c in item_list if not isinstance
(c, (ogAST.State, ogAST.TextArea, ogAST.Start))]:
LOG.debug('PASTE ' + str(i))
# Create the new item from the AST description
new_item = Renderer.render(i, scene=CLIPBOARD,
parent=None, states=states)
# Check that item is compatible with parent
if (type(new_item).__name__ in parent.allowed_followers):
# Move the item from the clipboard to the scene
scene.addItem(new_item)
new_item.setPos(0, 0)
symbols.append(new_item)
else:
raise TypeError('Cannot paste here ({t1} cannot follow {t2}'
.format(t1=type(new_item), t2=type(parent)))
return symbols
TASTE-Dataview DEFINITIONS AUTOMATIC TAGS ::=
BEGIN
T-INTEGER ::= INTEGER (0..255)
T-SEQ ::= SEQUENCE {
hello INTEGER (0..10),
world ENUMERATED { hop, hips },
howareyou CHOICE { choice-A T-INTEGER, choice-B T-INTEGER }
}
T-POS ::= SEQUENCE {
x T-INTEGER,
y SEQUENCE { a BOOLEAN, b SEQUENCE (SIZE(3)) OF BOOLEAN },
z T-SEQ
}
myVar T-SEQ ::= { hello 4, world hop, howareyou choice-B: 42 }
-- TODO : add test T-A ::= T-B to see how ReferenceTypes are followed
END
-------------------------------
UBUNTU FONT LICENCE Version 1.0
-------------------------------
PREAMBLE
This licence allows the licensed fonts to be used, studied, modified and
redistributed freely. The fonts, including any derivative works, can be
bundled, embedded, and redistributed provided the terms of this licence
are met. The fonts and derivatives, however, cannot be released under
any other licence. The requirement for fonts to remain under this
licence does not require any document created using the fonts or their
derivatives to be published under this licence, as long as the primary
purpose of the document is not to be a vehicle for the distribution of
the fonts.
DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this licence and clearly marked as such. This may
include source files, build scripts and documentation.
"Original Version" refers to the collection of Font Software components
as received under this licence.
"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to
a new environment.
"Copyright Holder(s)" refers to all individuals and companies who have a
copyright ownership of the Font Software.
"Substantially Changed" refers to Modified Versions which can be easily
identified as dissimilar to the Font Software by users of the Font
Software comparing the Original Version with the Modified Version.
To "Propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification and with or without charging
a redistribution fee), making available to the public, and in some
countries other activities as well.
PERMISSION & CONDITIONS
This licence does not grant any rights under trademark law and all such
rights are reserved.
Permission is hereby granted, free of charge, to any person obtaining a
copy of the Font Software, to propagate the Font Software, subject to
the below conditions:
1) Each copy of the Font Software must contain the above copyright
notice and this licence. These can be included either as stand-alone
text files, human-readable headers or in the appropriate machine-
readable metadata fields within text or binary files as long as those
fields can be easily viewed by the user.
2) The font name complies with the following:
(a) The Original Version must retain its name, unmodified.
(b) Modified Versions which are Substantially Changed must be renamed to
avoid use of the name of the Original Version or similar names entirely.
(c) Modified Versions which are not Substantially Changed must be
renamed to both (i) retain the name of the Original Version and (ii) add
additional naming elements to distinguish the Modified Version from the
Original Version. The name of such Modified Versions must be the name of
the Original Version, with "derivative X" where X represents the name of
the new work, appended to that name.
3) The name(s) of the Copyright Holder(s) and any contributor to the
Font Software shall not be used to promote, endorse or advertise any
Modified Version, except (i) as required by this licence, (ii) to
acknowledge the contribution(s) of the Copyright Holder(s) or (iii) with
their explicit written permission.
4) The Font Software, modified or unmodified, in part or in whole, must
be distributed entirely under this licence, and must not be distributed
under any other licence. The requirement for fonts to remain under this
licence does not affect any document created using the Font Software,
except any version of the Font Software extracted from a document
created using the Font Software may only be distributed under this
licence.
TERMINATION
This licence becomes null and void if any of the above conditions are
not met.
DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER
DEALINGS IN THE FONT SOFTWARE.
GNU LESSER GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
This version of the GNU Lesser General Public License incorporates
the terms and conditions of version 3 of the GNU General Public
License, supplemented by the additional permissions listed below.
0. Additional Definitions.
As used herein, "this License" refers to version 3 of the GNU Lesser
General Public License, and the "GNU GPL" refers to version 3 of the GNU
General Public License.
"The Library" refers to a covered work governed by this License,
other than an Application or a Combined Work as defined below.
An "Application" is any work that makes use of an interface provided
by the Library, but which is not otherwise based on the Library.
Defining a subclass of a class defined by the Library is deemed a mode
of using an interface provided by the Library.
A "Combined Work" is a work produced by combining or linking an
Application with the Library. The particular version of the Library
with which the Combined Work was made is also called the "Linked
Version".
The "Minimal Corresponding Source" for a Combined Work means the
Corresponding Source for the Combined Work, excluding any source code
for portions of the Combined Work that, considered in isolation, are
based on the Application, and not on the Linked Version.
The "Corresponding Application Code" for a Combined Work means the
object code and/or source code for the Application, including any data
and utility programs needed for reproducing the Combined Work from the
Application, but excluding the System Libraries of the Combined Work.
1. Exception to Section 3 of the GNU GPL.
You may convey a covered work under sections 3 and 4 of this License
without being bound by section 3 of the GNU GPL.
2. Conveying Modified Versions.
If you modify a copy of the Library, and, in your modifications, a
facility refers to a function or data to be supplied by an Application
that uses the facility (other than as an argument passed when the
facility is invoked), then you may convey a copy of the modified
version:
a) under this License, provided that you make a good faith effort to
ensure that, in the event an Application does not supply the
function or data, the facility still operates, and performs
whatever part of its purpose remains meaningful, or
b) under the GNU GPL, with none of the additional permissions of
this License applicable to that copy.
3. Object Code Incorporating Material from Library Header Files.
The object code form of an Application may incorporate material from
a header file that is part of the Library. You may convey such object
code under terms of your choice, provided that, if the incorporated
material is not limited to numerical parameters, data structure
layouts and accessors, or small macros, inline functions and templates
(ten or fewer lines in length), you do both of the following:
a) Give prominent notice with each copy of the object code that the
Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the object code with a copy of the GNU GPL and this license
document.
4. Combined Works.
You may convey a Combined Work under terms of your choice that,
taken together, effectively do not restrict modification of the
portions of the Library contained in the Combined Work and reverse
engineering for debugging such modifications, if you also do each of
the following:
a) Give prominent notice with each copy of the Combined Work that
the Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the Combined Work with a copy of the GNU GPL and this license
document.
c) For a Combined Work that displays copyright notices during
execution, include the copyright notice for the Library among
these notices, as well as a reference directing the user to the
copies of the GNU GPL and this license document.
d) Do one of the following:
0) Convey the Minimal Corresponding Source under the terms of this
License, and the Corresponding Application Code in a form
suitable for, and under terms that permit, the user to
recombine or relink the Application with a modified version of
the Linked Version to produce a modified Combined Work, in the
manner specified by section 6 of the GNU GPL for conveying
Corresponding Source.
1) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (a) uses at run time
a copy of the Library already present on the user's computer
system, and (b) will operate properly with a modified version
of the Library that is interface-compatible with the Linked
Version.
e) Provide Installation Information, but only if you would otherwise
be required to provide such information under section 6 of the
GNU GPL, and only to the extent that such information is
necessary to install and execute a modified version of the
Combined Work produced by recombining or relinking the
Application with a modified version of the Linked Version. (If
you use option 4d0, the Installation Information must accompany
the Minimal Corresponding Source and Corresponding Application
Code. If you use option 4d1, you must provide the Installation
Information in the manner specified by section 6 of the GNU GPL
for conveying Corresponding Source.)
5. Combined Libraries.
You may place library facilities that are a work based on the
Library side by side in a single library together with other library
facilities that are not Applications and are not covered by this
License, and convey such a combined library under terms of your
choice, if you do both of the following:
a) Accompany the combined library with a copy of the same work based
on the Library, uncombined with any other library facilities,
conveyed under the terms of this License.
b) Give prominent notice with the combined library that part of it
is a work based on the Library, and explaining where to find the
accompanying uncombined form of the same work.
6. Revised Versions of the GNU Lesser General Public License.
The Free Software Foundation may publish revised and/or new versions
of the GNU Lesser General Public License from time to time. Such new
versions will be similar in spirit to the present version, but may
differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the
Library as you received it specifies that a certain numbered version
of the GNU Lesser General Public License "or any later version"
applies to it, you have the option of following the terms and
conditions either of that published version or of any later version
published by the Free Software Foundation. If the Library as you
received it does not specify a version number of the GNU Lesser
General Public License, you may choose any version of the GNU Lesser
General Public License ever published by the Free Software Foundation.
If the Library as you received it specifies that a proxy can decide
whether future versions of the GNU Lesser General Public License shall
apply, that proxy's public statement of acceptance of any version is
permanent authorization for you to choose that version for the
Library.
This diff is collapsed.
This diff is collapsed.
include *.md
include LICENSE
all: compile-all
regression: compile-all
make -C tests/regression all
coverage: compile-all
make -C tests/regression coverage
compile-all:
pyside-rcc opengeode.qrc -o icons.py
if [ ! -f antlr-3.1.3.tar.bz2 ]; then wget http://download.tuxfamily.org/taste/misc/antlr-3.1.3.tar.bz2 ; tar jxvf antlr-3.1.3.tar.bz2 ; fi
CLASSPATH=$$PWD/antlr-3.1.3/lib/antlr-3.1.3.jar java org.antlr.Tool sdl92.g
install: compile-all
mkdir -p opengeode
for f in AdaGenerator.py __init__.py genericSymbols.py icons.py ogAST.py ogParser.py opengeode.py Renderer.py samnmax.py sdl92Lexer.py sdl92Parser.py sdlSymbols.py undoCommands.py Clipboard.py Statechart.py LlvmGenerator.py Lander.py; do echo Installing $$f && cp $$f opengeode; done
python setup.py install
publish: install
python setup.py sdist upload
clean:
find . -name '*~' | xargs rm -f
find . -name '*.o' | xargs rm -f
OpenGEODE is a tiny, free SDL editor done in the scope of the TASTE project.
SDL is the Specification and Description Language (Z100 standard from ITU-T)
Author: Maxime Perrotin
(maxime.perrotin@esa.int)
The background pattern was downloaded from www.subtlepatterns.com
Developer documentation is provided in docstrings in the Python modules.
License is LGPL (see file LICENSE)
You need Pyside and ANTLR 3.1.3 runtimes to be able to use this Python module
On Debian, Ubuntu:
$ apt-get install python-pyside pip
$ pip install antlr_python_runtime
Also tested on Windows and FreeBSD - use pip to install antlr-python-runtime.
Install Pyside from the Windows binary or from FreeBSD ports.
On Windows, you also need to install Python 2.7 manually.
To make a static binary on Linux with pyinstaller 2.0:
python pyinstaller.py ../../opengeode.py --onefile
This diff is collapsed.
This diff is collapsed.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
This module is a free SDL editor.
It allows to graphically design state machines, using a formal, well-
defined language, and generate Ada code from the models.
"""
__version__ = "0.99"
from opengeode import opengeode
#!/bin/bash
echo 'you must download and install antlr_python_runtime-3.1.3.tar.gz:
(from http://pypi.python.org/pypi/antlr_python_runtime/3.1.3 for ex)
cd /opt
sudo tar zxvf antlr_python_runtime-3.1.3.tar.gz
cd antlr_python_runtime-3.1.3
sudo python setup.py install --record install.record
To uninstall later, type:
sudo rm $(cat install.record)
You must also download and unpack antlr-3.1.3.tar.gz
'
export CLASSPATH=$(pwd)/antlr-3.1.3/lib/antlr-3.1.3.jar
java org.antlr.Tool sdl92.g
PROCESS behaviour;
/* CIF TEXT (-1232, 418), (218, 140) */
-- Local variables
DCL line QLine;
DCL conn GenericConnection;
DCL pos, last_pos Position;
/* CIF ENDTEXT */
/* CIF START (-1234, 27), (100, 50) */
START;
/* CIF NEXTSTATE (-1234, 92), (100, 50) */
NEXTSTATE idle;
/* CIF STATE (-1025, 46), (100, 50) */
STATE idle;
/* CIF INPUT (-1053, 116), (155, 50) */
INPUT click_on_left_menu
(item_type)
/* CIF COMMENT (-847, 116), (112, 50) */
COMMENT 'User chose
the link icon';
/* CIF DECISION (-1029, 181), (107, 70) */
DECISION 'item_type';
/* CIF ANSWER (-1143, 271), (120, 35) */
('Connection'):
/* CIF NEXTSTATE (-1175, 321), (184, 50) */
NEXTSTATE wait_connection_source;
/* CIF ANSWER (-933, 271), (100, 35) */
ELSE:
/* CIF NEXTSTATE (-951, 321), (135, 50) */
NEXTSTATE wait_placement;
ENDDECISION;
ENDSTATE;
/* CIF STATE (-559, 47), (184, 50) */
STATE wait_connection_source
/* CIF COMMENT (-351, 48), (154, 50) */
COMMENT 'Wait until the user
clicks on the scene';
/* CIF INPUT (-538, 117), (141, 50) */
INPUT mousePress(pos);
/* CIF PROCEDURE (-554, 182), (173, 50) */
CALL findSymbol(pos, elem)
/* CIF COMMENT (-368, 181), (241, 51) */
COMMENT 'Check if there is a symbol at that
position (or close to it)';
/* CIF DECISION (-545, 247), (156, 70) */
DECISION validStartSymbol
(elem)
/* CIF COMMENT (-373, 255), (244, 53) */
COMMENT 'If there is a symbol, check if it can
have a connection starting from it';
/* CIF ANSWER (-694, 337), (100, 35) */
(TRUE):
/* CIF TASK (-712, 387), (137, 50) */
TASK parent := elem,
last_pos := pos;
/* CIF PROCEDURE (-753, 452), (218, 50) */
CALL NewConnection(parent, conn)
/* CIF COMMENT (-515, 452), (189, 50) */
COMMENT 'Create a new connection';
/* CIF TASK (-723, 517), (159, 50) */
TASK line := Line(pos, pos)
/* CIF COMMENT (-544, 517), (203, 50) */
COMMENT 'Create a line that will
update when mouse moves';
/* CIF NEXTSTATE (-709, 582), (130, 50) */
NEXTSTATE WaitNextClick;
/* CIF ANSWER (-316, 337), (100, 35) */
(FALSE):
/* CIF NEXTSTATE (-316, 387), (100, 50) */
NEXTSTATE Wait;
ENDDECISION;
ENDSTATE;
/* CIF STATE (376, 26), (125, 50) */
STATE WaitNextClick;
/* CIF INPUT (89, 96), (141, 50) */
INPUT mousePress(pos);
/* CIF PROCEDURE (106, 161), (107, 50) */
CALL updateLine
(line, pos)
/* CIF COMMENT (233, 161), (159, 50) */
COMMENT 'Redraw the line
to the clicked point';
/* CIF PROCEDURE (73, 226), (173, 50) */
CALL findSymbol(pos, elem)
/* CIF COMMENT (254, 224), (241, 51) */
COMMENT 'Check if there is a symbol at that
position (or close to it)';
/* CIF DECISION (92, 291), (135, 70) */
DECISION validEndSymbol
(elem)
/* CIF COMMENT (247, 301), (245, 50) */
COMMENT 'If there is a symbol, check if it can
have a connection ending at it';
/* CIF ANSWER (-127, 381), (100, 35) */
(TRUE):
/* CIF PROCEDURE (-162, 431), (171, 50) */
CALL updatePos(pos, elem)
/* CIF COMMENT (28, 431), (290, 50) */
COMMENT 'If symbol was just CLOSE to the click,
adjust the end point to touch the symbol';
/* CIF PROCEDURE (-130, 496), (107, 50) */
CALL updateLine
(line, pos)
/* CIF COMMENT (-11, 496), (139, 50) */
COMMENT 'Redraw the line
to the new point';
/* CIF PROCEDURE (-153, 561), (152, 50) */
CALL updateConnection
(conn, line);
/* CIF NEXTSTATE (-127, 626), (100, 50) */
NEXTSTATE Wait;
/* CIF ANSWER (354, 381), (100, 35) */
(FALSE):
/* CIF PROCEDURE (328, 431), (152, 50) */
CALL updateConnection
(conn, line);
/* CIF NEXTSTATE (342, 496), (125, 50) */
NEXTSTATE WaitNextClick;
ENDDECISION;
/* CIF INPUT (568, 96), (142, 50) */
INPUT mouseMove(pos);
/* CIF DECISION (557, 161), (164, 70) */
DECISION last_pos!x - pos!x < 2
/* CIF COMMENT (741, 171), (137, 50) */
COMMENT 'Block a bit when
line is vertical';
/* CIF ANSWER (529, 251), (100, 35) */
(TRUE):
/* CIF TASK (504, 301), (149, 50) */
TASK pos!x := last_pos!x;
/* CIF ANSWER (664, 251), (100, 35) */
(FALSE):
ENDDECISION;
/* CIF DECISION (553, 366), (171, 70) */
DECISION last_pos!y - pos!y < 2
/* CIF COMMENT (743, 376), (138, 50) */
COMMENT 'Block a bit when
line is horizontal';
/* CIF ANSWER (664, 456), (100, 35) */
(FALSE):
/* CIF ANSWER (529, 456), (100, 35) */
(TRUE):
/* CIF TASK (504, 506), (149, 50) */
TASK pos!y := last_pos!y;
ENDDECISION;
/* CIF PROCEDURE (585, 571), (107, 50) */
CALL updateLine
(line, pos)
/* CIF COMMENT (713, 571), (159, 50) */
COMMENT 'Redraw the line
to the clicked point';
/* CIF TASK (575, 636), (127, 50) */
TASK last_pos := pos;
/* CIF NEXTSTATE (577, 701), (125, 50) */
NEXTSTATE WaitNextClick;
ENDSTATE;