ALPHA Script - XML Model
Upcoming SlideShare
Loading in...5
×
 

ALPHA Script - XML Model

on

  • 975 views

ALPHA Script - XML Model (Draft 7)

ALPHA Script - XML Model (Draft 7)

Statistics

Views

Total Views
975
Views on SlideShare
966
Embed Views
9

Actions

Likes
1
Downloads
0
Comments
0

2 Embeds 9

http://www.linkedin.com 8
https://www.linkedin.com 1

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

ALPHA Script - XML Model ALPHA Script - XML Model Document Transcript

  • XML Model (Draft 7)ALPHA Script - XML Model has to be well defined and self explained. It is important to try togenerate a lightweight XML schema for easy and fast parsing.XML Model (Schema)<?xml version="1.0" encoding="UTF­8"?><program name="[File name]">[XML CODE]</program>Code Sections 1. Definitions <definitions> <definition id="def_num"> … </definition> </definitions> 2. Code Blocks <code_blocks> <code_block id="code_block_num"> … </code_block> </code_blocks> 3. Base <base> … </baseIn the XML schema any "code" element in the above sections must have a unique ID.References & ValuesIn the XML the references are marked with "@" and the values are marked with "$". The   references   return   an   expression   for   processing   while   the   values   return   a result. These two symbols can be used anywhere in the XML but a few options among the elements such as "expression", "args" and "execute" do not need them.
  • ALPHA Script XML equivalent tags for each category of keywords.General Rule<code id="[Unique ID]" keyword="[KEY]" {[arg 1]="[val 1]"}…/>Boolean 1.   <code id="code_id" keyword="and" arg_1="val_1" arg_2="val_2"/> 2.   <code id="code_id" keyword="not" arg_1="val_1" arg_2="val_2"/> 3.   <code id="code_id" keyword="or" arg_1="val_1" arg_2="val_2"/> 4.   <code id="code_id" keyword="xor" arg_1="val_1" arg_2="val_2"/> 5.   <code id="code_id" keyword="true" arg_1="val_1" arg_2="val_2"/> 6.   <code id="code_id" keyword="false" arg_1="val_1" arg_2="val_2"/>Bit 1.   <code id="code_id" keyword="shift"  direction="left or right" bits="num"/>Control 1.       <code id="code_id" keyword="if"  expression="def_num" execute="code_block_num"/> 2.       <code id="code_id" keyword="else"/> 3.       <code id="code_id" keyword="while"  expression="def_num" execute="code_block_num"/> 4.       <code id="code_id" keyword="break"/> 5.       <code id="code_id" keyword="continue"/> 6.       <code id="code_id" keyword="try" execute="code_block_num"/> 7.       <code id="code_id" keyword="catch" execute="code_block_num"/> 8.       <code id="code_id" keyword="exit" value="val"/> 9.       <code id="code_id" keyword="input" input="in" value="val"/> 10. <code id="code_id" keyword="output" output="out" value="val"/> 11. <code id="code_id" keyword="set" {class="class_name"}  var="var_name or array_name"  {index="num"} value="val"/> 12. <code id="code_id" keyword="call"  {class="class_name"} function="func_name or method_name"    {args="def_num"} result="var_name or array_name"/> 13. <code id="code_id" keyword="loop" iterations="val"     {step="val"} execute="code_block_num"/> 14. <code id="code_id" keyword="counter"/>Results 1.  <code id="code_id" keyword="return" value="val"/>
  • Declarations 1.   <code id="code_id" keyword="alias" key="keyword" alias="alias"/> 2.   <code id="code_id" keyword="directive" value="val"/> 3.   <code id="code_id" keyword="var" action="declare"  scope="global, local or public, private" name="var_name"/> 4.   <code id="code_id" keyword="array" action="declare"  scope="global, local or public, private" name="array_name"/>Var & Array Usage 1.   <code id="code_id" keyword="var" {class="class_name"}  name="var_name" action="use" function="func_name"  {option="opt"} {value="val"}/> 2.   <code id="code_id" keyword="array" {class="class_name"}   name="array_name" action="use" function="func_name"  {index="num"} {option="opt"} {value="val"}/>Structure 1.   <code id="code_id" keyword="package" name="package_name"/> 2.   <code id="code_id" keyword="use" package="package_name"/> 3.   <code_block>  (BEGIN) 4.   </code_block> (END)Class 1.   <code id="code_id" keyword="class" class="class_name"  type="dynamic or static" execute="code_block_num"/>Function 1.   <code id="code_id" keyword="function" function="func_name"  {args="def_num"} execute="code_block_num" result="var_name"/>Method 1.   <code id="code_id" keyword="method" method="method_name"  {args="def_num"} scope="public or private"  execute="code_block_num" {result="var_name"}/>Errors & Exceptions 1.   <code id="code_id" keyword="debug"/>
  • Utilities 1.   <code id="code_id" keyword="db" function="func_name"  {option="opt"} {args="def_num"} result="var_name"/> 2.   <code id="code_id" keyword="net" function="func_name"  {option="opt"} {args="def_num"} result="var_name"/> 3.   <code id="code_id" keyword="file" function="func_name"  {option="opt"} {args="def_num"} result="var_name"/> 4.   <code id="code_id" keyword="security" function="func_name"   {option="opt"} {args="def_num"} result="var_name"/> 5.   <code id="code_id" keyword="graphics" function="func_name"   {option="opt"} {args="def_num"} result="var_name"/> 6.   <code id="code_id" keyword="sound" function="func_name"  {option="opt"} {args="def_num"} result="var_name"/> 7.   <code id="code_id" keyword="system" function="func_name"   {option="opt"} {args="def_num"} result="var_name"/> 8.   <code id="code_id" keyword="virtual" action="declare" interface="int_name" result="var_name"/>Virtual Interface Usage 1.   <code id="code_id" keyword="virtual" action="use"     interface="int_name" function="func_name"  {option="opt"} {args="def_num"} result="var_name"/>Argument 1.   <code id="code_id" keyword="argument" action="declare" value="val"/>Argument Usage 1.   <code id="code_id" keyword="argument"  action="use" name="arg_name" value="val"/>Show 1.   <code id="code_id" keyword="print" value="val" output="out"/>
  • ALPHA Script XML equivalent tags for each category of symbols.General Rule<code id="[Unique ID]" symbol="[SYMBOL]" {[arg 1]="[val 1]" [arg 2]="[val 2]}"/>Mathematics 1.   <code id="code_id" symbol="+" arg_1="val_1" arg_2="val_2"/> 2.   <code id="code_id" symbol="­" arg_1="val_1" arg_2="val_2"/> 3.   <code id="code_id" symbol="*" arg_1="val_1" arg_2="val_2"/> 4.   <code id="code_id" symbol="/" arg_1="val_1" arg_2="val_2"/> 5.   <code id="code_id" symbol="%" arg_1="val_1" arg_2="val_2"/>Comparisons 1.   <code id="code_id" symbol="=" arg_1="val_1" arg_2="val_2"/> 2.   <code id="code_id" symbol=">" arg_1="val_1" arg_2="val_2"/> 3.   <code id="code_id" symbol="<" arg_1="val_1" arg_2="val_2"/> 4.   <code id="code_id" symbol="!" arg_1="val_1" arg_2="val_2"/>Parentheses 1.   <code id="code_id" symbol="("/> 2.   <code id="code_id" symbol=")"/>Delimiters 1.   <code id="code_id" symbol=","/>
  • ALPHA Script XML equivalent tags of ALPHA Script tags for embedding in HTML 4/5.General Rule<code id="code_id" keyword="as_tags"/> ­ Put code in ALPHA Script tags (<@ … @>)George Delaportas (G0D)---CEO & Founder of localhost Ltd.Informatics & Computer EngineerMSc in Data Communications & NetworkingPhD in Digital Forensics