From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,1479b753518e2325 X-Google-Attributes: gid103376,public From: micro_ada@my-dejanews.com Subject: Re: how to make Ada more popular? Date: 1999/01/23 Message-ID: <78c4h1$l29$1@nnrp1.dejanews.com> X-Deja-AN: 435931447 References: <787hk5$q6t@drn.newsguy.com> <36A793AB.7A000E82@netwood.net> X-Http-Proxy: 1.0 cache-kc:3128 (Squid/1.1.22), 1.0 x7.dejanews.com:80 (Squid/1.1.22) for client 209.186.247.68, 209.186.240.18 Organization: Deja News - The Leader in Internet Discussion X-Article-Creation-Date: Sat Jan 23 09:24:53 1999 GMT Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.04 [en] (OS/2; I) Date: 1999-01-23T00:00:00+00:00 List-Id: In article <36A793AB.7A000E82@netwood.net>, "E. Robert Tisdale" 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