[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Typol & Eclipse IO predicates
- Subject: Typol & Eclipse IO predicates
- From: parisel@enseeiht.fr (Christophe PARISEL)
- Date: 16 May 1995 19:04:19 +0200
Hello,
I'm writing a Typol program to manage IOs.
This program is broken into 2 sets : input and output.
program io is
use MyLang;
import read(_),writeln(_) from prolog ;
set input is
judgement |- MyLang ;
read(X)
-------------
|- lit_inte X ;
end input ;
set output is
judgement |- MyLang ;
write(X)
-----------
|- lit_inte X ;
end output ;
end io;
lit_inte is defined as follows in METAL :
<lit_inte> ::= %LITINTE ;
lit_inte-atom(%LITINTE)
abstract syntax
lit_inte -> implemented as INTEGER ;
Note that when the rule of "input" is applied, X is a free variable,
whereas it must be previously assigned when the rule of "output" is called.
My problem is that output works fine, but input doesn't work at all...
If you've got an idea about it, please tell me ! :-)
Thanks,
C.Parisel
## # ### +-------------------------------------------------------+ ## # ###
# ## # | ENSEEIHT-Genie Logiciel, 31071 Toulouse Cedex, FRANCE | # ## #
# # # +-------------------------------------------------------+ # # #