The Control Tables of my NetRexx Scanner and Parser.

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

The Control Tables of my NetRexx Scanner and Parser.

ThSITC
I cannot RESIST to notify you that I'm working hard:

NetRexx.opers   -- a File defining the NetRexx Operators (and their
precendence)
==============================================================

* Operators for the NetRexx Language

autoline: 0

skip_leading_blanks: 1
skip_trailing_blanks: 1 -- we can NOT skip trailing blanks, as they are
significant in NetRexx

lmargin: 1
rmargin: 0  -- no right margin

* Note that the delimiters are now build Dynamically

idchars1: ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz._$
idchars2: ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789._$
idchars: ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789._$

allow_abut_OP: 1
allow_blank_OP: 1

op_SOCmnt: /*
op_EOCmnt: */

op_SONote: --
op_SODir: %
op_CONT: , -

cont_column1: 0  -- 0 indicates NO fixed continuation column
cont_column2: 0

cmnt_column: 0
cmnt_chars:

nested_comments: 1

opt_test: 0   -- set to 1 for your tests, when you like

* Class: Code Precedence Operator(s)
List: 61 5 (
List: 62 8 ,
List: 63 5 )
List: 64 7 [
List: 65 7 ]
List: 66 1 ;
List: 69 8 ][
List: 70 10 :
String: 51 14 ||
String: 51 14 (abut)
String: 52 14 (blank)
Arithmetic: 1 15 +
Arithmetic: 2 15 -
Arithmetic: 3 16 *
Arithmetic: 4 16 /
Arithmetic: 5 17 **
Arithmetic: 6 16 %
Arithmetic: 7 16 //

Compare: 11 13 =
Compare: 12 13 <
Compare: 13 13 >
Compare: 14 13 <>
Compare: 15 13 <=
Compare: 16 13 >=
Compare: 14 13 \=
Compare: 14 13 ^=
Compare: 21 13 ==
Compare: 22 13 <<
Compare: 23 13 >>
Compare: 24 13 ^==
Compare: 25 13 <<=
Compare: 26 13 >>=
Compare: 25 13 ^>>
Compare: 26 13 ^<<
Compare: 25 13 \>>
Compare: 26 13 \<<
Compare: 24 13 \==
Compare: 14 13 ¬=
Compare: 25 13 ¬>>
Compare: 26 13 ¬<<
Compare: 24 13 ¬==
Compare: 32 13 ^>
Compare: 33 13 ^<
Compare: 33 13 ¬>
Compare: 34 13 ¬<

Logical: 40 18 \ -- unary NOT
Logical: 41 12 &
Logical: 42 11 |
Logical: 43 12 &&
Logical: 40 11 ¬
Logical: 40 18 ^

Assign: 90 1 :=   -- note that this is an ARTFICIAL Operator, actually
'=' is used in the source

* NetRexx does NOT support +=,-=, etc

NetRexx.RWL (The 'reserved Verbs and Words in NetRexx)
==============================================
****************************************************************************
* NetRexx Verbs & Directives
*    (c) Th. Schneider, 2005-2011,all rights reserved
****************************************************************************
* 16.04.2011: THEN adedded as a verb, to avoid various Parser Problems
*****************************************************************************
OPTIONS,Directive,reserved,optionslist
IMPORT,Directive,reserved,symbol
PACKAGE,Directive,reserved,symbol
PROPERTIES,Directive,reserved,attributes
CLASS,Directive,reserved,classdef
METHOD,Directive,reserved,methoddef
TRACE,Directive,reserved,tracedef

DO,Verb,structural
LOOP,Verb,structural
END,Verb,structural
EXIT,Verb
IF,Verb
THEN,Verb
ELSE,Verb
ITERATE,Verb
LEAVE,Verb
NOP,Verb
NUMERIC,Verb
PARSE,Verb,Decl
RETURN,Verb
SAY,Verb
SELECT,Verb,structural
WHEN,Verb,select
OTHERWISE,Verb,select
SIGNAL,Verb
CATCH,Verb
FINALLY,Verb
COMPUTE,Verb,artificial

******************************************************************************

* Attributes (which are only recognised in Declarations)
******************************************************************************
INHERITABLE,Attr,Visibility
PRIVATE,Attr,Visibility
PUBLIC,Attr,Visibility
SHARED,Attr,Visibility

CONSTANT,Attr,Modifier
STATIC,Attr,Modifier
TRANSIENT,Attr,Modifier
VOLATILE,Attr,Modifier

DEPRECATED,Attr,obsolete
UNUSED,Attr,obsolete

ABSTRACT,Attr,Classr
ADAPTER,Attr,CLass
FINAL,Attr,Class
INTERFACE,Attr,Class
BINARY,Attr,Class
DEPRECATED,Attr,Class
EXTENDS,Attr,Class,classname
USES,Attr,Class,useslist
IMPLEMENTS,Attr,Class,interfacelist

NetRexx.builtin: The BUILTIN Methods (or functions)
=======================================
******************************************************************************
* BUILTIN FUNCS::
*
*   classic REXX builtin functions:
*   NEEDS CASE MIXED FOR EDITING !
*   ===============================
*                                            TH. SCHNEIDER, 11.1.2000
******************************************************************************
* 19.11.2000: Text function userid () added  (CMS builtin )
* 01.04.2007: Defaukt value 'B' in function strip added (test-prog:
jschedxc)
******************************************************************************
Logical ABBREV ( information , info [ , length ] )
Number ABS ( number )
Text ADDRESS ( )
Text ARG ( [ n [ , option ] ] )
Text BITAND ( string-1 [ , [ string-2 ] [ , pad ] ] )
Text BITOR  ( string-1 [ , [ string-2 ] [ , pad ] ] )
Text BITXOR ( string-1 [ , [ string-2 ] [ , pad ] ] )
Text B2X ( binary-string )
Text CENTER ( string , length , [ pad ] )
Text CENTRE ( string , length , [ pad ] )
Char CHARIN ( [ name ] , [ [ start ] [ , length ] ] )
Number CHAROUT ( [ name ] [ , [ string ] [ , start ] ] )
Number CHARS ( [ name ] )
Number COMPARE ( string1 , string2 [ , pad ] )
Text CONDITION ( [ option ] )
Text COPIES ( string , n )
Number C2D ( string [ , n ] )
Text C2X ( string )
Any DATATYPE ( string [ , type ] )
Text DATE ( [ option ] )
Text DELSTR ( string ,  n [ , length ] )
Any DELWORD ( string , n [ , length ] )
Number DIGITS ( )
Text D2C ( number [ , n ] )
Text D2X ( number [ , n ] )
Text ERRORTEXT ( i-error )
Text FORM ( )
Text FORMAT ( number [ , [ before ] [ , after ] ] ] )
Number FUZZ ( )
Text INSERT ( new , target [ , [ n ] [ , length ] [ , pad ] ] ] )
Number LASTPOS ( needle , haystack , [ i-start ] )
Text LEFT ( string , length [ , pad ] )
Number LENGTH ( string )
Text LINEIN ( [ file-id ] [ , line-number ] [ , count ] )
Number LINEOUT ( [ file-id ] [ , string ] [ , line ] )
Number LINES ( [ file-id ] )
Number MAX ( number [ , number ] ... )
Number MIN ( number [ , number ] ... )
Number TRUNC ( Numeric [ , n] )
Number CEIL  ( Numeric )
Number ROUND ( Numeric )
Text OVERLAY ( new , target [ , [ n ] [ , [ length ] [ , pad ] ] ] )
Number POS ( needle , haystack [ , i-start ] )
Number QUEUED ( )
Number RANDOM ( [ min ] [ , max ] [ , seed ] ] )
Number RANDOM ( max )
Text REVERSE ( string )
Text RIGHT ( string , length [ , pad ] )
Number SIGN ( number )
Text SOURCELINE ( [ n ] )
Text SPACE ( string [ , [ n ] [ , pad ] ] )
Text STREAM ( [ file-id [ , operation [ , stream-command ] ] )
Text STRIP ( string [ , [ option=Text 'Both'] [ , pad ] ] )
Text SUBSTR ( string , n [ , length ] [ , pad ] ] )
Any SUBWORD ( string , n [ , length ] )
Text SYMBOL ( name )
Text TIME ( [ option ] )
Text TRACE ( [ trace-setting ] )
Text TRANSLATE ( string [ , [ tableo ] [ , [ tablei ][ , pad ] ] ] )
Number TRUNC ( number [ , n ] )
Text VALUE ( name [ , [ new-value ] ] [ , selector ] )
Number VERIFY ( string , reference [ , [ option ] [ , start  ] ] )
Any WORD ( string , n )
Number WORDINDEX ( string , n )
Number WORDLENGTH ( string , n )
Number WORDPOS ( phrase, string [ , i-start ] )
Number WORDS ( string )
Text XRANGE ( [ c-start ] [ , c-end ] )
BitString X2B ( hex-string )
Text X2C ( hex-string )
Number X2D ( hex-string [ , n ] )
* ... CMS builtin functions, which must be simulated
Text USERID ( )

===================================================
Please NOTE, that the TRANSFORMER does, by convention,
translate all FUNCTION oriented invokations to METHOD oriented
invokations, and that *the first argument* is taken as the OBJECT by
default.

If another parameter *is the object*, it has to be prefixed my a hash-sign.
Also note, that I'm using some special Types, as Number, BitString,
Text, etc, mainly for historical reasons...

Kind regards from dark Vienna,

Thomas Schneider.

PS: Similiar Tables do exist for classic Rexx, ooRexx, PL/I, COBOL, etc. :-)
--
Thomas Schneider (Founder of www.thsitc.com) Member of the Rexx Languge
Asscociation (www.rexxla.org) Member of the NetRexx Developer's Team
(www.netrexx.org)

_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/

Thomas Schneider, Vienna, Austria (Europe) :-)

www.thsitc.com
www.db-123.com
Reply | Threaded
Open this post in threaded view
|

Re: The Control Tables of my NetRexx Scanner and Parser.

Aviatrexx
On 10/2/11 20:34 Thomas Schneider said:
> I cannot RESIST to notify you that I'm working hard:

Please try harder.

We are all working hard, Thomas.  Do you see us posting random
snippets of our work to the discussion group?

I have not yet consigned you to my 'twit-filter' but I'm getting close.

-Chip-
_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/

Reply | Threaded
Open this post in threaded view
|

Re: The Control Tables of my NetRexx Scanner and Parser.

ThSITC
Hello Chip, and all,
    the Code snippet was only to give you some impression how to
implement SYNONYMS in NetRexx.

    But I'm close to release the whole package, by the way.
Thomas.
==========================================================
Am 03.10.2011 02:00, schrieb Chip Davis:

> On 10/2/11 20:34 Thomas Schneider said:
>> I cannot RESIST to notify you that I'm working hard:
>
> Please try harder.
>
> We are all working hard, Thomas.  Do you see us posting random
> snippets of our work to the discussion group?
>
> I have not yet consigned you to my 'twit-filter' but I'm getting close.
>
> -Chip-
> _______________________________________________
> Ibm-netrexx mailing list
> [hidden email]
> Online Archive : http://ibm-netrexx.215625.n3.nabble.com/
>
>


--
Thomas Schneider (Founder of www.thsitc.com) Member of the Rexx Languge
Asscociation (www.rexxla.org) Member of the NetRexx Developer's Team
(www.netrexx.org)
_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/

Thomas Schneider, Vienna, Austria (Europe) :-)

www.thsitc.com
www.db-123.com