version 1.52, 2006/02/04 02:44:39 |
version 1.57, 2013/01/31 06:08:06 |
|
|
%%%%%%%%%%% $OpenXM: OpenXM/src/kan96xx/Doc/ox.sm1,v 1.51 2006/02/02 10:53:08 takayama Exp $ |
%%%%%%%%%%% $OpenXM: OpenXM/src/kan96xx/Doc/ox.sm1,v 1.56 2006/12/21 05:29:49 takayama Exp $ |
|
|
/ox.sm1.myname (ox-new.sm1) def |
/ox.sm1.myname (ox-new.sm1) def |
|
|
Line 796 ox.verbose { oxhelp } { } ifelse |
|
Line 796 ox.verbose { oxhelp } { } ifelse |
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
%%% Aux functions for ox_asir |
%%% Aux functions for ox_asir |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
/ox_asirConnectMethod { asirconnectr /oxasir.ccc set } def |
/ox_asirConnectMethod { |
|
asirconnectr /oxasir.ccc set |
|
[(getenv) (OX_ASIR_LOAD_FILE)] extension tag 0 eq { 0 } |
|
{ /oxasir.loadfile [$load("$[(getenv) (OX_ASIR_LOAD_FILE)] extension $");$] |
|
cat def |
|
oxasir.ccc oxasir.loadfile oxsubmit |
|
oxasir.ccc oxpopcmo } ifelse |
|
} def |
/oxasir.loadmethod 1 def %% "..." oxsendcmo (load) ox... |
/oxasir.loadmethod 1 def %% "..." oxsendcmo (load) ox... |
/oxasir.verbose 0 def |
/oxasir.verbose 0 def |
/oxasir.ccc load isArray |
/oxasir.ccc load isArray |
Line 1712 oxasir.verbose { |
|
Line 1719 oxasir.verbose { |
|
$ [1 2 ] ] asir.wgr $ |
$ [1 2 ] ] asir.wgr $ |
]] putUsages |
]] putUsages |
|
|
|
/print_tex_form.aux { |
|
/arg1 set |
|
[/f /ans] pushVariables |
|
[ |
|
arg1 /f set |
|
[(UseDsmall)] system_variable /vv set |
|
[(UseDsmall) 1] system_variable |
|
f isArray { |
|
f { print_tex_form.aux } map /ans set |
|
}{ |
|
[$quote($, f toString, $) $] cat /ans set |
|
} ifelse |
|
[(UseDsmall) vv] system_variable |
|
ans /arg1 set |
|
] pop |
|
popVariables |
|
arg1 |
|
} def |
|
|
|
/print_tex_form { |
|
/arg1 set |
|
[/f /comm /vv] pushVariables |
|
[(CurrentRingp)] pushEnv |
|
[ |
|
/f arg1 def |
|
oxasir.ccc [ ] eq { |
|
(Starting ox_asir server.) message |
|
ox_asirConnectMethod |
|
} { } ifelse |
|
|
|
oxasir.ccc ( quotetotex_env("conv_rule",7); ) oxsubmit |
|
oxasir.ccc oxpopcmo ; |
|
|
|
f print_tex_form.aux /f set |
|
[$ print_tex_form($, f $); $] cat /comm set |
|
oxasir.ccc comm oxsubmit |
|
oxasir.ccc oxpopcmo /arg1 set |
|
] pop |
|
popEnv |
|
popVariables |
|
arg1 |
|
} def |
|
|
|
[(print_tex_form) |
|
[ (obj print_tex_form str) |
|
]] putUsages |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
%%% functions to start ox_asir |
%%% functions to start ox_asir |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
Line 1847 oxasir.verbose { |
|
Line 1900 oxasir.verbose { |
|
|
|
[[(lines),[10,-1]], |
[[(lines),[10,-1]], |
[(where),[(shell), (length)]], |
[(where),[(shell), (length)]], |
[(reason_of_error), (invalid argument)]] |
[(reason_of_error), (invalid argument)], |
|
[(asir_where),[[(toplevel),10],[(string),(foo),3],[(string),(hoge),-1]] |
|
] |
/i1 set |
/i1 set |
%% /translateErrorForCfep.sampleInput set |
%% /translateErrorForCfep.sampleInput set |
|
|
Line 1858 oxasir.verbose { |
|
Line 1913 oxasir.verbose { |
|
] putUsages |
] putUsages |
/translateErrorForCfep { |
/translateErrorForCfep { |
/arg1 set |
/arg1 set |
[/ee /ans /tt /lf /i /nn] pushVariables |
[/ee /ans /tt /lf /i /nn /ee.orig /tt2] pushVariables |
[ |
[ |
/ee arg1 def |
/ee arg1 def |
{ |
{ |
ee etag 257 eq { |
ee etag 257 eq { |
ee (body) dc 1 get /ee set |
ee (body) dc 1 get /ee set ee /ee.orig set |
ee length 3 gt { |
ee length 3 gt { |
ee 3 get /ee set |
ee 3 get /ee set |
|
ee [[(reason_of_error) ee.orig 2 get toString ]] join /ee set |
}{ |
}{ |
%% nn should be 2, [serial, common error no, short message] |
%% nn should be 2, [serial, common error no, short message] |
ee length /nn set |
ee length /nn set |
Line 1916 oxasir.verbose { |
|
Line 1972 oxasir.verbose { |
|
nl lf] join /ans set |
nl lf] join /ans set |
}{ } ifelse |
}{ } ifelse |
|
|
|
%% Keyword from asir. [(asir_where) [[(toplevel),3],[(string),(foo),3],[(filename),(func),4]]] |
|
ee (asir_where) getNode /tt set |
|
tt (toplevel) getNode /tt2 set |
|
tt2 isInteger, tt2 tag 15 eq, or { |
|
ans [(gotoLine, ) tt2 toString nl lf] join /ans set |
|
} { } ifelse |
|
tt isArray { |
|
0 1 tt length 1 sub { |
|
/i set |
|
tt i get /tt2 set |
|
tt2 (string) getNode tag 0 eq { } |
|
{ |
|
tt2 length 2 gt { |
|
tt2 2 get /tt2 set |
|
tt2 isInteger, tt2 tag 15 eq, or { |
|
tt2 toString .. /tt2 set |
|
tt2 (-1).. gt, tt2 (4294967295).. lt, and { |
|
ans [(gotoLine, ) tt2 toString nl lf] join /ans set |
|
} { } ifelse |
|
} { } ifelse |
|
}{ } ifelse |
|
} ifelse |
|
} for |
|
}{ } ifelse |
|
|
exit |
exit |
} loop |
} loop |
ans [(End) nl lf] join /ans set |
ans [(End) nl lf] join /ans set |
Line 1933 oxasir.verbose { |
|
Line 2014 oxasir.verbose { |
|
cl oxgetsp /n set |
cl oxgetsp /n set |
n tag 0 eq { /n 0 def } { } ifelse |
n tag 0 eq { /n 0 def } { } ifelse |
n tag 15 eq { n (integer) dc /n set } { } ifelse |
n tag 15 eq { n (integer) dc /n set } { } ifelse |
cl n oxpops pop |
cl n oxpops |
] pop |
] pop |
popVariables |
popVariables |
} def |
} def |