From: "singlespeeder" <singlespeeder@32sixteen.com>
Subject: Compiling AFLEX 1.4a with Dec Ada 83 3.5-20 on Open VMS 7.1
Date: Sat, 21 Apr 2001 20:19:12 +0100
Date: 2001-04-21T20:19:12+01:00 [thread overview]
Message-ID: <9bsm5c$khe$1@uranium.btinternet.com> (raw)
I've got hold of the source for AFLEX 1.4a and want to compile it to run on
Open VMS 7.1
The compiler I have access to is DEC Ada 83 3.5-20.
As far as I can tell there are two things in the code that require
modification.
1) AFLEX 1.4a assumes that the Ada 95 package Ada.Command_Line is available.
2) AFLEX 1.4a assumes that the Ada 95 implementation of Text_IO is
available, and uses the file Standard_Error. It also generates a debug
scanner that uses Standard_Error.
I've addressed the first issue by writing a package VAX_Command_Line that
wraps starlet, and I just used that in place of Ada.Command_Line - I only
had to change two packages, both of which were documented in the manual.
I'm having more trouble with the second issue. In the lex specification for
the scanner I currently get around the scanner assuimg the presence of
Standard_Error by the following kludge in my lex specification. (Note that
AFLEX 1.4a only has two user defined sections, not 4 as in some manuals)
-- definitions
%%
-- rules
%%
-- user defined section copied before yylex
package foo is
standard_error : text_io.file_type;
function yylex return token;
end foo;
package body foo is
##
-- user defined section copied after yylex
begin
text_io.create (file => standard_error,
mode => out_file,
name => lexer_error.txt);
end foo;
So my package foo declares it's own standard_error, which it creates when
the package is elaborated. It always does this even when I instruct AFLEX
not to generate a debug scanner - in which case I get an empty
lexer_error.txt file.
Is there a better way of writing my lex specification so that I don't have
to have this kludge, or am I going to have to poke around in the source of
Aflex? I don't want to do this because I don't want to then have to generate
a set of tests for AFLEX to make sure I haven't screwed it up.
Nick
next reply other threads:[~2001-04-21 19:19 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-04-21 19:19 singlespeeder [this message]
2001-04-23 13:33 ` Compiling AFLEX 1.4a with Dec Ada 83 3.5-20 on Open VMS 7.1 Marin David Condic
2001-04-23 14:31 ` Ted Dennison
2001-05-02 12:43 ` Charlie McCutcheon
2001-05-02 13:43 ` Marin David Condic
2001-05-02 17:12 ` Larry Kilgallen
2001-05-02 16:38 ` Marin David Condic
2001-05-02 22:29 ` Larry Kilgallen
2001-05-02 22:03 ` Marin David Condic
2001-05-03 0:29 ` Larry Kilgallen
2001-05-03 14:49 ` Marin David Condic
2001-05-03 20:53 ` Larry Kilgallen
2001-05-04 19:21 ` Charlie McCutcheon
2001-05-07 16:09 ` Don McCabe
2001-05-02 22:26 ` Jeffrey Carter
-- strict thread matches above, loose matches on Subject: below --
2001-05-03 16:12 Gautier of my Mollin
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox