repo.or.cz
/
fedora-idea.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
ComponentWithBrowseButton - optional remove listener on hide
[fedora-idea.git]
/
tools
/
lexer
/
jflex-1.4
/
examples
/
interpreter
/
example.as
blob
81522472e175f4c908d26cbd8f01681767bdf656
1
2
// example program for interpreter testing
3
// contains division and modulo functins
4
5
input a
,
b
6
functions div
(
x
,
y
) =
if
x
<
y
7
then
0
8
else
div
(
x
-
y
,
y
)+
1
9
fi
,
10
mod
(
x
,
y
) =
if
x
<
y
11
then x
12
else
mod
(
x
-
y
,
y
)
13
fi
14
output div
(
a
,
b
),
mod
(
a
,
b
)
15
arguments
324
,
17
16
end