comp.lang.ada
 help / color / mirror / Atom feed
From: micro_ada@my-dejanews.com
Subject: Re: how to make Ada more popular?
Date: 1999/01/23
Date: 1999-01-23T00:00:00+00:00	[thread overview]
Message-ID: <78c4h1$l29$1@nnrp1.dejanews.com> (raw)
In-Reply-To: 36A793AB.7A000E82@netwood.net

In article <36A793AB.7A000E82@netwood.net>,
  "E. Robert Tisdale" <edwin@netwood.net> wrote:
> bill_1@nospam.com wrote:
>
> > lets face it. Ada is not used much in commerical sector.
> >
> > What can be done to improve the situation?
>
> The answer is simple:
[snip]
>
> 3. Write an Ada interpreter or p-code compiler
> so that Ada applets can be safely distributed
> on the world wide web.

Borland allowed third-party Pascal vendors to make money by providing
a distribution mechanism which kept the source code a secret.  Borland
called the mechanism compiled "units" or binary compatible units.
Compatibility was determined by comparing version stamps.  Third-party
vendors could then securely sell units and interfaces to their units.

The equivalent for Ada would be the abstract syntax tree (AST) for the
compilation units of a library package.  Theoretically, ASIS (Ada
Semantic Interface Specification) could be used by third-party vendors
to distribute compatible tools that analyze or manipulate an AST.

But a flexible means must be provided to protect the distribution of
Ada source code and AST's.  Consider the Java archive (JAR) mechanism
for distributing j-code files which can be interpreted on-the-fly by
web browsers.  J-code level is somewhere between Ada source code and
an AST.

So then two situations must be addressed: an Ada distribution archive
(ADA), and a compatible lexeme format to represent Ada source code
(i.e. lexical units as bytecodes followed by a counted length string).
An ADA contains a directory of the files stored inside it.  The files
are either source code (.ads, .adb, .adc), lexeme files (.lxs, .lxb,
.lxc), Ada distribution trees (.adt), or compiled subunits (.sub)
depending upon the intended user.

The .ad* files signify "Ada distribution" of specification, body, and
configuration pragmas.  I'll post information about ADA format later
at the Ada community http://www.dejanews.com/~ada

Two main reasons a third-party vendor would want a standardized lexeme
format is to market tools that can interpret source code during design
phase editing or during synthesis phase code generation of a
restricted subset.  A client can benefit from the lexeme format
because they can use the tools and resources offered by third-party
vendors of Ada software.  And the possibility exists for some clients
to benefit from an interpretable Ada Distribution Tree coupled with
compiled subunits.

Overview,
1. Analysis phase:  Translate scanner output into lexeme format.
2. Design phase:    Examine and manipulate lexeme files.
3. Synthesis phase: Interpret lexeme files.  Output into AST or ADT.
4. Test phase.
5. Maintenance phase.

The specification of token bytecodes is arbitrary but must become
universal if compatibility is to be maintained.  Therefore the values
of the token bytecodes are defined as follows:

package acode is
--  Author: John Howard
--    Date: January 23, 1999
--    http://www.dejanews.com/~ada
--
--  All the information required to access unencrypted lexeme files
--  during the design phase or synthesis phase.
--
--  The lexeme format is token bytecode followed by pascal counted
--  string.  A pascal counted string is a count byte followed by zero
--  or more characters.  A wide_character uses two characters.
--  Most of the lexemes have a zero count byte and no string.
--  (Byte is 8 bits wide)
--
---------------------------------
-- Name                  Value --
------------------------ --------
token_Literal_Null      :=  0;  -- null access
token_Literal_Integer   :=  1;  -- Counted string representation
token_Literal_Real      :=  2;  -- Counted string representation
token_Literal_String    :=  3;  -- Counted string representation
token_Literal_Character :=  4;  -- Counted string representation
token_Operator_Symbol   :=  5;  -- "+" "-" "*" "/" "**" "rem" "mod"
                                -- "and" "or" "xor" "not" "&" "="
                                -- "/=" "<" ">" "<=" ">="
token_Identifier        :=  6;  -- Counted string representation
token_Comment           :=  7;  -- "--" to be ignored.
token_EOF               :=  8;  -- End of file for compilation unit.

-- Single delimiters
token_ampersand         :=  9;  -- '&'
token_tick              := 10;  -- '''
token_paren_left        := 11;  -- '('
token_paren_right       := 12;  -- ')'
token_multiply          := 13;  -- '*'
token_plus              := 14;  -- '+'
token_comma             := 15;  -- ','
token_minus             := 16;  -- '-'
token_dot               := 17;  -- '.'
token_divide            := 18;  -- '/'
token_colon             := 19;  -- ':'
token_semicolon         := 20;  -- ';'
token_less              := 21;  -- '<'
token_equal             := 22;  -- '='
token_greater           := 23;  -- '>'
token_vertical_line     := 24;  -- '|'

-- Compound delimiters
token_arrow             := 25;  -- "=>"
token_double_dot        := 26;  -- ".."
token_double_star       := 27;  -- "**"
token_becomes           := 28;  -- ":="
token_not_equal         := 29;  -- "/="
token_greater_equal     := 30;  -- ">="
token_less_equal        := 31;  -- "<="
token_label_left        := 32;  -- "<<"
token_label_right       := 33;  -- ">>"
token_box               := 34;  -- "<>"

-- Ada95 reserved keywords in alphabetical order from 35..103
token_abort             := 35;
token_abs               := 36;
token_abstract          := 37;
token_accept            := 38;
token_access            := 39;
token_aliased           := 40;
token_all               := 41;
token_and               := 42;
token_array             := 43;
token_at                := 44;
token_begin             := 45;
token_body              := 46;
token_case              := 47;
token_constant          := 48;
token_declare           := 49;
token_delay             := 50;
token_delta             := 51;
token_digits            := 52;
token_do                := 53;
token_else              := 54;
token_elsif             := 55;
token_end               := 56;
token_entry             := 57;
token_exception         := 58;
token_exit              := 59;
token_for               := 60;
token_function          := 61;
token_generic           := 62;
token_goto              := 63;
token_if                := 64;
token_in                := 65;
token_is                := 66;
token_limited           := 67;
token_loop              := 68;
token_mod               := 69;
token_new               := 70;
token_not               := 71;
token_null              := 72;
token_of                := 73;
token_or                := 74;
token_others            := 75;
token_out               := 76;
token_package           := 77;
token_pragma            := 78;
token_private           := 79;
token_procedure         := 80;
token_protected         := 81;
token_raise             := 82;
token_range             := 83;
token_record            := 84;
token_rem               := 85;
token_renames           := 86;
token_requeue           := 87;
token_return            := 88;
token_reverse           := 89;
token_select            := 90;
token_separate          := 91;
token_subtype           := 92;
token_tagged            := 93;
token_task              := 94;
token_terminate         := 95;
token_then              := 96;
token_type              := 97;
token_until             := 98;
token_use               := 99;
token_when              :=100;
token_while             :=101;
token_with              :=102;
token_xor               :=103;

-- Reserved codes for private format counted strings
token_version_info      :=104;  -- compilation unit version info
token_compilation_info  :=105;  -- compilation unit info
token_vendor_info       :=106;  -- vendor information

--  Reserved codes 107 to 127 for future Ada standards.
--  Reserved codes 128 to 255 for interpreting Ada Distribution Trees.
end acode;

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    




  parent reply	other threads:[~1999-01-23  0:00 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-01-21  0:00 how to make Ada more popular? bill_1
1999-01-21  0:00 ` Tucker Taft
1999-01-21  0:00   ` Hans N. Beck
1999-01-21  0:00 ` Al Christians
1999-01-21  0:00   ` bill_1
1999-01-21  0:00 ` E. Robert Tisdale
1999-01-21  0:00   ` Tom Moran
1999-01-22  0:00   ` Samuel Tardieu
1999-01-23  0:00   ` micro_ada [this message]
1999-01-23  0:00     ` Al Christians
1999-01-21  0:00 ` Tom Moran
1999-01-22  0:00   ` dennison
1999-01-22  0:00     ` Tarjei Tj�stheim Jensen
1999-01-24  0:00     ` Tom Moran
1999-01-24  0:00       ` bill_1
1999-01-25  0:00         ` Kees Serier
1999-01-21  0:00 ` Fraser Wilson
1999-01-22  0:00   ` Samuel Tardieu
1999-01-22  0:00 ` Tarjei Tj�stheim Jensen
1999-01-22  0:00 ` Aidan Skinner
1999-01-24  0:00   ` dewar
1999-01-25  0:00     ` Markus Kuhn
1999-01-24  0:00       ` Al Christians
1999-01-25  0:00       ` dennison
1999-01-29  0:00     ` Aidan Skinner
1999-01-22  0:00 ` Steve Doiel
1999-01-23  0:00   ` Tom Moran
1999-01-24  0:00   ` Lack of Ada Windows books (was: " Larry Kilgallen
1999-01-22  0:00 ` Kees Serier
1999-01-22  0:00   ` dennison
1999-01-25  0:00   ` news.oxy.com
1999-01-25  0:00     ` bill_1
1999-01-30  0:00       ` Nick Roberts
1999-01-25  0:00     ` Jerry van Dijk
1999-01-26  0:00       ` Richard D Riehle
1999-01-27  0:00         ` kna
1999-01-27  0:00           ` Tom Moran
1999-01-25  0:00   ` David Botton
1999-01-23  0:00 ` Bob Munck
1999-01-31  0:00   ` Nick Roberts
1999-01-27  0:00 ` Making ADA More Popular Michael Garrett
1999-01-27  0:00   ` joel
1999-01-27  0:00   ` Marin David Condic
1999-01-27  0:00   ` Michael Garrett
1999-01-28  0:00   ` dewar
1999-02-03  0:00 ` how to make Ada more popular? Donald Duck
1999-02-03  0:00   ` Andrzej Lewandowski
1999-02-03  0:00     ` news.oxy.com
1999-02-03  0:00   ` Larry Kilgallen
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox