/******************************************************************************/ /* */ /* RVM.HostEmu.cls - The ADDRESS environments of the libraries of the RVM */ /* ====================================================================== */ /* */ /* A library of the RVM may register ADDRESS environments when it is loaded */ /* (LibraryEnvironments, RVM.World~loadLibrary); a command to one of them is */ /* run here (EnvironmentCommand), before the host's environments, and gives */ /* its RC and the condition it raises ("", ERROR, FAILURE). No redirections */ /* (ADDRESS ... WITH) apply to them. */ /* */ /* hostemu (ooRexx's extensions/hostemu, the environment HOSTEMU): a port of */ /* its command handler (GrxHost, platform/unix/hostemu.cpp) and of its */ /* parser (cmdparse.ypp: the tables of the LALR parser that Bison made, in */ /* cmdparse.cpp, and its skeleton, so that what parses, what does not and in */ /* which order the actions run are the native's). The commands: */ /* */ /* EXECIO n|* DISKW file [( [FINIS] [STEM name] [)]] */ /* EXECIO n|* DISKR file [start] [( [FINIS] [FIFO|LIFO|STEM name] [SKIP] */ /* [)]] (the options in any order) */ /* HI a HALT at the next clause boundary (as RexxSetHalt) */ /* TE TS the immediate commands of trace: accepted, and nothing done */ /* (RC 0). The native's turn TRACE OFF, or TRACE ?R, at the next */ /* clause boundary (RexxResetTrace, RexxSetTrace): an accepted */ /* divergence (they make no sense in the RVM). */ /* */ /* A command that does not parse writes 'hostemu: bad PLIST, token "syntax */ /* error"' on the standard error (Bison's yyerror); one whose count or start */ /* is not all digits does not (the action returns 1). Both: RC 24, ERROR. A */ /* file that cannot be opened: RC 24, FAILURE. EOF before the count: RC 2; */ /* a variable name that is not valid (or a variable to write that has no */ /* value): RC 2008; neither raises a condition. */ /* */ /* As in the native: the files stay open (by their name as given) until a */ /* FINIS, each with one position for reading and writing; DISKW opens a new */ /* one as "w+" (emptied), DISKR as "r+" (it must exist and be writable). A */ /* record is what fgets reads into a buffer of 100000 (at most 99999 bytes, */ /* up to a "0a"x), up to its first "00"x, without the "0a"x; a CR stays. A */ /* record written is the value up to its first "00"x and a "0a"x. The queue */ /* is always SESSION (not the current one). The stem's variables are set and */ /* fetched as symbolic names (RXSHV_SYSET, RXSHV_SYFET: in upper case, tails */ /* substituted); a fetch of a variable that has no value is RC 2008. Counts */ /* and starts are C's atoi (a count that overflows may be -1, that is, *). */ /* */ /* On Windows (Windows(): or with RVM_WINDOWS_HOSTEMU=1), as its hostemu */ /* (platform/windows/hostemu.cpp) and Microsoft's C library: files opened */ /* "r+", else "r" (DISKR), else "w+" (HostEmuOpen); text mode (WinFGets, */ /* FPuts); a FILE that is reading takes no writes until a read met the end; */ /* atoi saturates to 32 bits. See ../doc/12-libraries.md. */ /* */ /* This file is part of the RVM, the Rexx Virtual Machine */ /* [See https://rexx.epbcn.com/rexx-parser/] */ /* */ /* This file is derived from the ooRexx interpreter: hostemu (hostemu.cpp, */ /* cmdparse.ypp, cmdparse.cpp). It is therefore distributed under the Common */ /* Public License v1.0, not under the Apache License 2.0 that covers the rest */ /* of the RVM (see NOTICE). */ /* */ /* Copyright (c) 1995, 2004 IBM Corporation. All rights reserved. */ /* Copyright (c) 2005-2026 Rexx Language Association. All rights reserved. */ /* Copyright (c) 2026 Josep Maria Blasco */ /* */ /* This program and the accompanying materials are made available under the */ /* terms of the Common Public License v1.0 which accompanies this */ /* distribution. A copy is also available at the following address: */ /* https://www.oorexx.org/license.html */ /* */ /******************************************************************************/ -- Run 'command' in environment 'env', which library 'lib' registered: an -- Array (RC, condition). ::Routine EnvironmentCommand Public Use Strict Arg lib, env, command, context If LibraryName( lib ) == "hostemu" Then Return HostEmuCommand( command, context ) Raise Syntax 93.900 Additional( "RVM: the environment" env "has no handler" ) /******************************************************************************/ /* GrxHost */ /******************************************************************************/ ::Routine HostEmuCommand Use Strict Arg command, context -- The command is a C string. nul = Pos( "00"x, command ) If nul > 0 Then command = Left( command, nul - 1 ) opts = HostEmuParse( command ) If opts == .Nil Then Return .Array~of( 24, "ERROR" ) Select Case opts~type When "HI" Then Do Call Halt context Return .Array~of( 0, "" ) End -- TRACE ?R (TS) or TRACE O (TE) at the next clause boundary. When "TS" Then Do context~externalTrace( "?R" ) Return .Array~of( 0, "" ) End When "TE" Then Do context~externalTrace( "O" ) Return .Array~of( 0, "" ) End Otherwise Nop End -- EXECIO: the file, opened when it is not. files = .RVM.HostEmuFiles~files f = files[ opts~filename ] If f == .Nil Then Do qname = .RVM.FileSystem~qualify( opts~filename ) If qname == "" Then Return .Array~of( 24, "FAILURE" ) hf = .RVM.HostFile~new( qname ) If \ HostEmuOpen( hf, opts~rw ) Then Return .Array~of( 24, "FAILURE" ) f = .RVM.HostEmuFile~new( hf ) files[ opts~filename ] = f End Select When opts~rw, opts~stem \== "" Then retc = WriteFromStem( f, opts, context ) When opts~rw Then retc = WriteFromQueue( f, opts ) -- (STEM name SKIP reads to the queue: that is, it skips.) When opts~stem \== "", opts~direction \= 2 Then retc = ReadToStem( f, opts, context ) Otherwise retc = ReadToQueue( f, opts ) End If opts~finis Then Do f~file~close files~remove( opts~filename ) End Return .Array~of( retc, "" ) -- fopen: DISKW "w+" (emptied), DISKR "r+" (it must exist and be writable). -- Windows: "r+" (an existing file, not emptied), then "r" for DISKR (one -- that cannot be written), then "w+" (a new one: for DISKR too). ::Routine HostEmuOpen Use Strict Arg hf, rw If \ Windows() Then Return hf~open( "READWRITE", rw, rw ) If hf~open( "READWRITE", .False, .False ) Then Return .True If \ rw, hf~open( "READ", .False, .False ) Then Return .True Return hf~open( "READWRITE", .True, .True ) -- HI: a HALT for the activation running, at its next clause boundary -- (RVM.Context~halt; one pending already is left as it is). ::Routine Halt Use Strict Arg context context~halt( "" ) -- The files open (NAME AS GIVEN -> RVM.HostEmuFile), for the whole process, -- as the native's list; whether the hostemu is Windows's (see Windows). ::Class RVM.HostEmuFiles ::Attribute files Class ::Attribute windows Class ::Method activate Class self~files = .Directory~new self~windows = .Nil -- Is the hostemu that of Windows (platform/windows/hostemu.cpp, with the C -- library of Microsoft)? On Windows, or anywhere with RVM_WINDOWS_HOSTEMU=1 -- (to test it). ::Routine Windows w = .RVM.HostEmuFiles~windows If w == .Nil Then Do w = .RVM.FileSystem~hostEmuWindows .RVM.HostEmuFiles~windows = w End Return w -- A file open: its RVM.HostFile and the position (0-based) of the C FILE. -- On Windows, also the state of Microsoft's FILE: its mode ("" none, "R" -- reading, "W" writing: _IOREAD, _IOWRITE) and whether a read met the end -- (_IOEOF). ::Class RVM.HostEmuFile ::Attribute file ::Attribute pos ::Attribute mode ::Attribute eof ::Method init Expose file pos mode eof Use Strict Arg file pos = 0 mode = "" eof = .False /******************************************************************************/ /* The records */ /******************************************************************************/ -- fgets into szInline (100000 bytes): at most 99999 bytes, up to and with a -- "0a"x; .Nil at the end of the file. ::Routine FGets Use Strict Arg f If Windows() Then Return WinFGets( f ) line = "" Loop chunk = f~file~readAt( f~pos, 4096 ) If chunk == .Nil | chunk == "" Then Leave take = Min( Length( chunk ), 99999 - Length( line ) ) lf = Pos( "0a"x, chunk ) If lf > 0, lf <= take Then take = lf line ||= Left( chunk, take ) f~pos += take If Right( line, 1 ) == "0a"x | Length( line ) == 99999 Then Leave End If line == "" Then Return .Nil Return line -- The record of what fgets read: up to its first "00"x (strlen), without -- the "0a"x at its end. ::Routine Record Use Strict Arg line nul = Pos( "00"x, line ) If nul > 0 Then line = Left( line, nul - 1 ) If Right( line, 1 ) == "0a"x Then line = Left( line, Length( line ) - 1 ) Return line -- fputs of a value and of "0a"x. ::Routine FPuts Use Strict Arg f, value nul = Pos( "00"x, value ) If nul > 0 Then value = Left( value, nul - 1 ) data = value || "0a"x If Windows() Then Do -- Microsoft's: a FILE that is reading takes no writes until a read met -- the end (_fwrite_nolock, _flsbuf: nothing written, and hostemu does -- not look); text mode: a "0a"x is written as "0d0a"x. If f~mode == "R", \ f~eof Then Return f~mode = "W" f~eof = .False data = ChangeStr( "0a"x, data, "0d0a"x ) End If f~file~writeAt( f~pos, data ) Then f~pos += Length( data ) -- fflush (after a DISKW): what was written goes to the file, and a FILE -- that was writing is neither reading nor writing (Microsoft's: one that -- was reading stays so). ::Routine FFlush Use Strict Arg f f~file~flush If f~mode == "W" Then f~mode = "" /******************************************************************************/ /* Windows: the text mode of Microsoft's C library */ /******************************************************************************/ -- fgets on Windows: a "0d0a"x of the file is read as "0a"x; a "1a"x (Ctrl-Z) -- is the end of the file. At most 99999 bytes as read, up to and with a -- "0a"x; .Nil at the end of the file. A FILE that is writing gives nothing -- (_filbuf: an error). ::Routine WinFGets Use Strict Arg f If f~mode == "W" Then Return .Nil f~mode = "R" line = "" Loop chunk = f~file~readAt( f~pos, 4096 ) If chunk == .Nil Then chunk = "" full = Length( chunk ) == 4096 z = Pos( "1a"x, chunk ) If z > 0 Then Do chunk = Left( chunk, z - 1 ) full = .False End If chunk == "" Then Do f~eof = .True Leave End -- The bytes up to the first "0a"x; a "0d"x at the end of a full chunk -- waits for the next one (it may be the start of a "0d0a"x). lf = Pos( "0a"x, chunk ) If lf > 0 Then raw = Left( chunk, lf ) Else Do raw = chunk If full, Right( raw, 1 ) == "0d"x Then raw = Left( raw, Length( raw ) - 1 ) End If Right( raw, 2 ) == "0d0a"x Then text = Left( raw, Length( raw ) - 2 ) || "0a"x Else text = raw room = 99999 - Length( line ) If Length( text ) > room Then Do -- (the bytes before a final "0d0a"x are the same in both) text = Left( text, room ) raw = text End line ||= text f~pos += Length( raw ) If Right( line, 1 ) == "0a"x | Length( line ) == 99999 Then Leave End If line == "" Then Return .Nil Return line -- Skip the records before 'start' (fgets, whatever it reads). ::Routine SkipTo Use Strict Arg f, start Do i = 1 While i < start If FGets( f ) == .Nil Then Leave End /******************************************************************************/ /* ExecIO_Write_From_Stem, ExecIO_Write_From_Queue, ExecIO_Read_To_Stem, */ /* ExecIO_Read_To_Queue */ /******************************************************************************/ ::Routine WriteFromStem Use Strict Arg f, opts, context count = opts~count If count = 0 Then Return 0 start = opts~start If count = -1 Then Do v = FetchVar( opts~stem"0", context ) If v == .Nil Then Return 2008 last = CAtoi( v ) End Else last = count Do i = start While i <= last v = FetchVar( opts~stem || i, context ) If v == .Nil Then Return 2008 Call FPuts f, v End Call FFlush f Return 0 ::Routine WriteFromQueue Use Strict Arg f, opts count = opts~count If count = 0 Then Return 0 q = .RVM.Queues start = opts~start Do While start > 1, q~count( "SESSION" ) > 0 line = q~pull( "SESSION" ) start -= 1 End If count = -1 Then count = q~count( "SESSION" ) Do While count > 0, q~count( "SESSION" ) > 0 Call FPuts f, q~pull( "SESSION" ) count -= 1 End Call FFlush f Return 0 ::Routine ReadToStem Use Strict Arg f, opts, context Call SkipTo f, opts~start count = opts~count retc = 0 i = 0 Loop While count = -1 | count > 0 line = FGets( f ) If line == .Nil Then Do If count \= -1 Then retc = 2 Leave End i += 1 If \ SetVar( opts~stem || i, Record( line ), context ) Then Return 2008 If count \= -1 Then count -= 1 End If \ SetVar( opts~stem"0", i, context ) Then Return 2008 Return retc ::Routine ReadToQueue Use Strict Arg f, opts Call SkipTo f, opts~start count = opts~count Loop While count = -1 | count > 0 line = FGets( f ) If line == .Nil Then Do If count \= -1 Then Return 2 Leave End If opts~direction \= 2 Then .RVM.Queues~add( "SESSION", Record( line ), opts~direction = 1 ) If count \= -1 Then count -= 1 End Return 0 /******************************************************************************/ /* The variable pool (RexxVariablePool: RXSHV_SYSET, RXSHV_SYFET) */ /******************************************************************************/ -- Set variable 'name' (a symbolic name) to 'value': .False when the name is -- not that of a variable (RXSHV_BADN). An environment symbol (a name that -- starts with a period) is not set, and that is not an error. ::Routine SetVar Use Strict Arg name, value, context ref = NameRef( name, context ) Select Case ref[1] When "SIMPLE" Then context~setVar( ref[2], value ) When "COMPOUND" Then context~setCompound( ref[2], ref[3], value ) When "CONST" Then Return IsDotVariable( ref[2] ) Otherwise Return .False End Return .True -- The string value of variable 'name' (a symbolic name): .Nil when the name -- is not that of a variable (RXSHV_BADN) or the variable has no value -- (RXSHV_NEWV: an environment symbol never has). ::Routine FetchVar Use Strict Arg name, context ref = NameRef( name, context ) Select Case ref[1] When "SIMPLE" Then v = context~lookupVar( ref[2] ) When "COMPOUND" Then v = context~lookupCompound( ref[2], ref[3] ) Otherwise Return .Nil End If v == .Nil Then Return .Nil Return PrimitiveString( v, context ) -- A name that is a constant symbol for NameRef but a variable for ooRexx's -- getVariableRetriever: an environment symbol (".NAME", not a number). ::Routine IsDotVariable Use Strict Arg name If Left( name, 1 ) \== "." | name == "." Then Return .False Return \ DataType( name, "N" ) -- The value as the variable pool copies it: a string's, or an object's -- stringValue (ooRexx's RexxObject~stringValue: what its OBJECTNAME -- returns, sent now; a stem's, its default's). ::Routine PrimitiveString Use Strict Arg v, context If \ v~isA( .RVM.Obj ) Then Return str( v ) If v~native~isA( .RVM.Stem ) Then Return StemString( v~native ) If v~native~isA( .RVM.VarRef ) Then Return v~native~string If v~native~isA( .String ) Then Return v~native name = context~world~loader~sendSync( v, "OBJECTNAME", .Array~new ) If name~isA( .RVM.Obj ) Then Return name~objectName If name == .Nil Then Return v~objectName Return str( name ) -- C's atoi: (int) strtol (blanks, a sign, digits; saturated to a long). -- Microsoft's saturates to an int (a long is 32 bits there). ::Routine CAtoi Use Strict Arg s Numeric Digits 40 s = Strip( Translate( s, " ", "090a0b0c0d"x ), "L" ) sign = 1 If Left( s, 1 ) == "-" | Left( s, 1 ) == "+" Then Do If Left( s, 1 ) == "-" Then sign = -1 s = SubStr( s, 2 ) End n = Verify( s, "0123456789" ) If n > 0 Then s = Left( s, n - 1 ) s = Strip( s, "L", "0" ) If s == "" Then Return 0 If Length( s ) > 19 Then v = 9223372036854775808 Else v = s + 0 If Windows() Then Do If sign > 0 Then Return Min( v, 2147483647 ) Return -Min( v, 2147483648 ) End If sign > 0 Then v = Min( v, 9223372036854775807 ) Else v = -Min( v, 9223372036854775808 ) Return IntOf( v ) -- A long cast to an int: its low 32 bits, signed. ::Routine IntOf Use Strict Arg v Numeric Digits 40 low = v // 4294967296 If low < 0 Then low += 4294967296 If low >= 2147483648 Then low -= 4294967296 Return low /******************************************************************************/ /* The parser: cmdparse.ypp (yylex, kwsearch, isnumeric) and the tables of */ /* Bison 2.4.1's cmdparse.cpp, with its skeleton (yyparse). */ /******************************************************************************/ -- The options of the command (an RVM.HostEmuOptions), or .Nil when it does -- not parse (yyparse returns 1). ::Routine HostEmuParse Use Strict Arg cmd t = .RVM.HostEmuTables opts = .RVM.HostEmuOptions~new lex = .RVM.HostEmuLexer~new( cmd ) states = .Array~of( 0 ) values = .Array~of( "" ) yystate = 0 yychar = -2 -- YYEMPTY Loop -- yynewstate If yystate == 8 Then Return opts -- YYFINAL: YYACCEPT -- yybackup rule = .Nil yyn = t~pact[ yystate + 1 ] If yyn \== -30 Then Do -- YYPACT_NINF If yychar == -2 Then Do yychar = lex~next yylval = lex~value End If yychar <= 0 Then Do yychar = 0 yytoken = 0 End Else yytoken = TokenNumber( yychar ) yyn += yytoken If yyn >= 0, yyn <= 60, t~check[ yyn + 1 ] == yytoken Then Do yyn = t~table[ yyn + 1 ] If yyn == 0 | yyn == -1 Then Return SyntaxError() If yyn > 0 Then Do -- shift yychar = -2 yystate = yyn states~append( yystate ) values~append( yylval ) Iterate End rule = -yyn End End -- yydefault If rule == .Nil Then Do rule = t~defact[ yystate + 1 ] If rule == 0 Then Return SyntaxError() End -- yyreduce yylen = t~r2[ rule + 1 ] n = values~items Select Case rule When 2 Then Do opts~type = "EXECIO" If \ IsNumeric( values[ n - 1 ] ) Then Return .Nil opts~count = CAtoi( values[ n - 1 ] ) End When 3 Then Do opts~type = "EXECIO" opts~count = -1 End When 4 Then opts~type = "HI" When 5 Then opts~type = "TE" When 6 Then opts~type = "TS" When 7 Then Do opts~rw = .True opts~filename = values[ n - 1 ] End When 8 Then Do opts~rw = .False opts~filename = values[ n - 1 ] End When 9 Then Do opts~rw = .False opts~filename = values[ n - 2 ] If \ IsNumeric( values[ n - 1 ] ) Then Return .Nil opts~start = CAtoi( values[ n - 1 ] ) End When 37 Then opts~finis = .True When 38 Then opts~direction = 2 When 39 Then opts~stem = values[ n ] When 41 Then opts~direction = 1 Otherwise Nop End -- $$ = $1 (garbage for an empty rule: no action uses it) If yylen > 0 Then yyval = values[ n - yylen + 1 ] Else yyval = "" Do yylen states~delete( states~last ) values~delete( values~last ) End lhs = t~r1[ rule + 1 ] top = states~lastItem yystate = t~pgoto[ lhs - 18 + 1 ] + top If yystate >= 0, yystate <= 60, t~check[ yystate + 1 ] == top Then yystate = t~table[ yystate + 1 ] Else yystate = t~defgoto[ lhs - 18 + 1 ] states~append( yystate ) values~append( yyval ) End -- yyerror: the grammar has no error rules, so the parse ends (YYABORT). ::Routine SyntaxError .Error~lineOut( 'hostemu: bad PLIST, token "syntax error"' ) Return .Nil -- YYTRANSLATE: the token numbers of Bison. ::Routine TokenNumber Use Strict Arg c Select When c == 42 Then Return 15 -- '*' When c == 40 Then Return 16 -- '(' When c == 41 Then Return 17 -- ')' When c >= 258, c <= 269 Then Return c - 255 Otherwise Return 2 -- $undefined End -- isnumeric: every character a digit ("" is numeric). ::Routine IsNumeric Use Strict Arg s Return Verify( s, "0123456789" ) == 0 -- What the actions set (ExecIO_Options, lStmtType). ::Class RVM.HostEmuOptions ::Attribute type ::Attribute count ::Attribute rw ::Attribute filename ::Attribute stem ::Attribute finis ::Attribute start ::Attribute direction ::Method init Expose type count rw filename stem finis start direction type = "" count = 0 rw = .False filename = "" stem = "" finis = .False start = 1 direction = 0 -- yylex: blanks and tabs between tokens; '*', '('; a string in double -- quotes (no way to have one inside), or a word (it starts with a letter, a -- digit or a backslash and runs up to a blank), each at most 1024 -- characters and at most 15 of them (SYMTABLESIZE): CONSTANT, or the -- keyword it is (in any case). Anything else, an unfinished string or the -- end: 0 (the end). ::Class RVM.HostEmuLexer ::Attribute value ::Method init Expose cmd ptr count value Use Strict Arg cmd ptr = 1 count = 0 value = "" ::Method next Expose cmd ptr count value Do While ptr <= Length( cmd ), Pos( SubStr( cmd, ptr, 1 ), " " || "09"x ) > 0 ptr += 1 End If ptr > Length( cmd ) Then Return 0 c = SubStr( cmd, ptr, 1 ) Select When c == "*" Then Do ptr += 1 Return 42 End When c == "(" Then Do ptr += 1 Return 40 End When c == '"' Then Do q = Pos( '"', cmd, ptr + 1 ) If q == 0 Then Return 0 token = SubStr( cmd, ptr + 1, q - ptr - 1 ) If Length( token ) > 1024 Then Return 0 ptr = q + 1 If count == 15 Then Return 0 count += 1 value = token Return 262 -- CONSTANT End When Verify( c, "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" || - "0123456789\" ) == 0 Then Do e = Pos( " ", cmd, ptr ) If e == 0 Then e = Length( cmd ) + 1 token = SubStr( cmd, ptr, e - ptr ) If Length( token ) > 1024 Then Return 0 ptr = e If count == 15 Then Return 0 count += 1 value = token Return KeywordOf( token ) End Otherwise Return 0 End -- kwsearch: the keyword a word is (toupper: ASCII), or CONSTANT. ::Routine KeywordOf Use Strict Arg token up = Translate( token, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", - "abcdefghijklmnopqrstuvwxyz" ) keywords = .Array~of( "EXECIO", "HI", "TE", "TS", "", "DISKW", "DISKR", - "STEM", "FINIS", "LIFO", "FIFO", "SKIP" ) n = keywords~index( up ) If n == .Nil | up == "" Then Return 262 -- CONSTANT Return 257 + n -- The tables of cmdparse.cpp (Bison 2.4.1), 1-based here. ::Class RVM.HostEmuTables ::Attribute defact Class ::Attribute defgoto Class ::Attribute pact Class ::Attribute pgoto Class ::Attribute table Class ::Attribute check Class ::Attribute r1 Class ::Attribute r2 Class ::Method activate Class self~r1 = Numbers( - "0 18 19 19 19 19 19 20 20 20 21 21 21 22 22 22 23 23 23 23 23 23" - "23 23 23 23 23 23 23 23 23 23 24 24 24 24 24 25 26 27 28 28 28" ) self~r2 = Numbers( - "0 2 3 3 1 1 1 3 3 4 0 2 3 0 2 3 0 1 1 1 2 2 2 2 2 2 3 3 3 3 3 3 0" - "1 1 2 2 1 1 2 1 1 1" ) self~defact = Numbers( - "0 0 4 5 6 0 0 0 1 0 0 2 3 13 10 32 7 10 16 8 0 37 14 33 34 9 41 40" - "38 11 17 19 42 18 39 15 35 36 12 21 20 25 24 22 23 27 26 31 30 28" - "29" ) self~defgoto = Numbers( "-1 5 11 19 16 29 22 23 31 32 33" ) self~pact = Numbers( - "27 -5 -30 -30 -30 5 35 35 -30 32 41 -30 -30 33 -4 36 -30 34 9 -30" - "44 -30 37 42 45 -30 -30 -30 -30 38 15 24 -30 31 -30 -30 -30 -30" - "-30 28 39 28 45 39 45 -30 -30 -30 -30 -30 -30" ) self~pgoto = Numbers( "-30 -30 50 43 -30 -30 -30 -18 -29 -6 -23" ) self~table = Numbers( - "30 39 6 17 44 8 37 40 42 24 7 46 18 41 49 43 45 36 47 20 21 26 27" - "28 48 20 50 26 27 28 1 2 3 4 20 21 26 27 20 13 26 27 21 9 10 28 20" - "21 14 15 18 34 20 28 35 38 21 12 0 0 25" ) self~check = Numbers( - "18 30 7 7 33 0 24 30 31 15 15 40 16 31 43 33 39 23 41 10 11 12 13" - "14 42 10 44 12 13 14 3 4 5 6 10 11 12 13 10 7 12 13 11 8 9 14 10" - "11 7 16 16 7 10 14 17 17 11 7 -1 -1 17" ) ::Routine Numbers Use Strict Arg list Return list~space~makeArray( " " ) ::Requires "modules/rvm/RVM.Number.cls" ::Requires "modules/rvm/RVM.Objects.cls" ::Requires "modules/rvm/RVM.BIFs.cls"