Sign in
android
/
platform
/
tools
/
idea
/
9b5d02ac8c92b1e71523cc15cb3d168d57fbd898
/
.
/
tools
/
lexer
/
jflex-1.4
/
examples
/
interpreter
/
example.as
blob: 81522472e175f4c908d26cbd8f01681767bdf656 [
file
] [
log
] [
blame
]
// example program for interpreter testing
// contains division and modulo functins
input a
,
b
functions div
(
x
,
y
)
=
if
x
<
y
then
0
else
div
(
x
-
y
,
y
)+
1
fi
,
mod
(
x
,
y
)
=
if
x
<
y
then
x
else
mod
(
x
-
y
,
y
)
fi
output div
(
a
,
b
),
mod
(
a
,
b
)
arguments
324
,
17
end