-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathrp_run.src
162 lines (127 loc) · 7.12 KB
/
rp_run.src
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
/*
This is the source from which pre-burned rules for Interpreter mode of
PP (xBaseScript) are created. You may copy this file to a file named
rp_run.ch to overide the pre-burned rules by modifying rp_run.ch.
*/
/*
* xBaseScript Project source code:
* Pre-Processor / Dot prompt environment / Script Interpreter
*
* Copyright 2000-2001 Ron Pinkas <ron@xharbour.com>
* www - http://www.xBaseScript.com
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA (or visit
* their web site at http://www.gnu.org/).
*/
#ifdef __HARBOUR__
#ifdef WIN
#COMMAND Alert( <x> ) => MessageBox( 0, CStr( <x> ), "xBaseScript for Windows", 0 )
#endif
#else
//#define __CLIPPER__
#endif
#TRANSLATE ... =>
#TRANSLATE AS <type: ANYTYPE, ARRAY, CHARACTER, CODEBLOCK, DATE, LOGICAL, NUMERIC, OBJECT, STRING, USUAL> =>
#TRANSLATE AS ARRAY OF <x> =>
#TRANSLATE AS CLASS <!x!> =>
#TRANSLATE AS CLASS <!x!> := => :=
#COMMAND _HB_CLASS <x> =>
#COMMAND _HB_MEMBER <x> =>
#ifndef __CONCILE_PCODE__
#XTRANSLATE QSelf() => PP_Qself()
#XTRANSLATE AddMethod( <MethodName>, @<!FunName!>(), <n>, <l> ) => AddInLine( <MethodName>, {|Self,p1,p2,p3,p4,p5,p6,p7,p8,p9| Eval( {|s| HB_SetWith( PP_QSelf(s) ) }, Self ), PP_ExecMethod( <"FunName">, p1,p2,p3,p4,p5,p6,p7,p8,p9 ), Eval( {|| PP_QSelf( HB_SetWith() ) } ) }, <n>, <l> )
#endif
#TRANSLATE :: => Self:
#COMMAND MEMVAR [<x,...>] =>
//#COMMAND BROWSE => Browse( 1, 0, MaxRow() - 1, MaxCol() )
#TRANSLATE _GET_( <var>, <varname>, [<pic>], [<valid>], [<when>] ) => __GET( MEMVARBLOCK(<varname>), <varname>, <pic>, <valid>, <when> )
#ifndef __HARBOUR__
#TRANSLATE __GET( <parlist,...>):Display() => __GET(<parlist>)
#endif
//#COMMAND EXTERNAL <!file1!> [, <!fileN!> ] => PP_ProcessFile( <file1> ) [; PP_ProcessFile( <fileN> ) ]
#COMMAND EXTERNAL <!file1!> [, <fileN> ] =>
//#COMMAND DECLARE <!class!> <declaraion> [<x,...>] => [<-x->]
// Must precede rule for DO CASE.
#COMMAND DO <!proc!> => <proc>()
#COMMAND DO <!proc!> WITH <arg1> [, <argN>] => <proc>( @<arg1> [, @<argN>] )
#COMMAND IF <ifExp> => PP__IF <ifExp>
#COMMAND ELSEIF <elseifExp> => PP__ELSEIF <elseifExp>
#COMMAND ELSE => PP__ELSE
#COMMAND ENDIF [<x,...>] => PP__ENDIF [<-x->]
#COMMAND END [<x,...>] => PP__END [<-x->]
#COMMAND DO CASE => PP__DOCASE
#COMMAND SWITCH <x> => PP__SWITCH <x>
#COMMAND CASE <caseExp> => PP__CASE <caseExp>
#COMMAND OTHERWISE => PP__OTHERWISE
#COMMAND DEFAULT => PP__DEFAULT
#COMMAND ENDCASE [<x,...>] => PP__ENDCASE [<-x->]
#COMMAND FOR <counter> := <start> TO <end> [STEP <step>] => PP__FOR <counter>:=<start>~TO~<end>~STEP~<step>
#COMMAND FOR <counter> = <start> TO <end> [STEP <step>] => PP__FOR <counter>:=<start>~TO~<end>~STEP~<step>
#COMMAND FOR EACH <enumerator> $ <enumeration> => PP__FOREACH <enumerator>~$~<enumeration>
#COMMAND ENDFOR [<x,...>] => PP__NEXT [<-x->]
#COMMAND LOOP [<x,...>] => PP__LOOP [<-x->]
#COMMAND EXIT [<x,...>] => PP__EXIT [<-x->]
#COMMAND NEXT [<x,...>] => PP__NEXT [<-x->]
#COMMAND DO WHILE <cond> => PP__WHILE <cond>
#COMMAND WHILE <cond> => PP__WHILE <cond>
#COMMAND ENDDO [<x,...>] => PP__ENDDO [<-x->]
#COMMAND TRY => PP__TRY
#COMMAND CATCH [<catcher>] => PP__CATCH <catcher>
#COMMAND FINALLY => PP__FINALLY
#COMMAND BEGIN SEQUENCE => PP__BEGIN
#COMMAND BREAK [<exp>] => PP_Break( <exp> )
#COMMAND RECOVER [USING <idVar>] => PP__RECOVER <idVar>
#COMMAND WITH OBJECT <withobject> => PP__WITHOBJECT <withobject>
#COMMAND DO <file>.PRG => PP_Run( #<file> + ".prg" )
#COMMAND DO <file>.PRG WITH <params,...> => PP_Run( #<file> + ".prg", {<params>} )
#COMMAND INIT PROCEDURE <!name!>[()] => PP_PROC_INIT <name>
#COMMAND EXIT PROCEDURE <!name!>[()] => PP_PROC_EXIT <name>
#COMMAND STATIC PROCEDURE <!name!>( <par,...> ) => PP_PROC_PRG <name> ; PP__LocalParams( { <"par"> } )
#COMMAND STATIC PROCEDURE <!name!>[()] => PP_PROC_PRG <name>
#COMMAND STATIC FUNCTION <!name!>( <par,...> ) => PP_PROC_PRG <name> ; PP__LocalParams( { <"par"> } )
#COMMAND STATIC FUNCTION <!name!>[()] => PP_PROC_PRG <name>
#COMMAND PROCEDURE <!name!>( <par,...> ) => PP_PROC <name> ; PP__LocalParams( { <"par"> } )
#COMMAND PROCEDURE <!name!>[()] => PP_PROC <name>
#COMMAND FUNCTION <!name!>( <par,...> ) => PP_PROC <name> ; PP__LocalParams( { <"par"> } )
#COMMAND FUNCTION <!name!>[()] => PP_PROC <name>
#COMMAND UTILITY STATIC PROCEDURE <!name!>( <par,...> ) => PP_PROC_PRG <name> ; PP__LocalParams( { <"par"> } )
#COMMAND UTILITY STATIC PROCEDURE <!name!>[()] => PP_PROC_PRG <name>
#COMMAND UTILITY STATIC FUNCTION <!name!>( <par,...> ) => PP_PROC_PRG <name> ; PP__LocalParams( { <"par"> } )
#COMMAND UTILITY STATIC FUNCTION <!name!>[()] => PP_PROC_PRG <name>
#COMMAND UTILITY PROCEDURE <!name!>( <par,...> ) => PP_PROC <name> ; PP__LocalParams( { <"par"> } )
#COMMAND UTILITY PROCEDURE <!name!>[()] => PP_PROC <name>
#COMMAND UTILITY FUNCTION <!name!>( <par,...> ) => PP_PROC <name> ; PP__LocalParams( { <"par"> } )
#COMMAND UTILITY FUNCTION <!name!>[()] => PP_PROC <name>
#COMMAND RETURN [<retExp>] => PP__Return( <retExp> )
#COMMAND PARAMETERS <par,...> => PP__Params( { <"par"> } )
#COMMAND PRIVATE <var,...> => PP__Privates( { <"var"> } )
#COMMAND DECLARE <var,...> => PP__Privates( { <"var"> } )
#COMMAND PUBLIC <var,...> => PP__Publics( { <"var"> } )
#COMMAND LOCAL <var,...> => PP__Locals( { <"var"> } )
#COMMAND STATIC <var,...> => PP__Statics( { <"var"> } )
#COMMAND FIELD <!var!> [, <morevars,...>] => <-var-> <-morevars->
#ifndef __CONCILE_PCODE__
#XTRANSLATE ProcName( [<n>] ) => PP_ProcName( <n> )
#XTRANSLATE ProcLine( [<n>] ) => PP_ProcLine( <n> )
#XTRANSLATE HB_EnumIndex() => PP_EnumIndex()
#XTRANSLATE ErrorBlock( [<NewBlock>] ) => PP_ErrorBlock( <NewBlock> )
#XTRANSLATE Throw( [<Exp>] ) => PP__THROW( <Exp> )
#XTRANSLATE __Quit( [<Exp>] ) => Break( <Exp> )
#endif
#XTRANSLATE IN <x> => $ <x>
#TRANSLATE IF( <cond>, [<true>], [<false>] ) => IIF( <cond>, <true>, <false> )
#ifdef AX
#XTRANSLATE Response. => ReSpOnSe:
#endif