[Plib-cvs] plib/doc/psl appl_guide.html,1.7,1.8
Brought to you by:
sjbaker
From: Steve B. <sj...@us...> - 2003-01-06 05:10:16
|
Update of /cvsroot/plib/plib/doc/psl In directory sc8-pr-cvs1:/tmp/cvs-serv11734/plib/doc/psl Modified Files: appl_guide.html Log Message: Added ability to compile from string variables. Index: appl_guide.html =================================================================== RCS file: /cvsroot/plib/plib/doc/psl/appl_guide.html,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- appl_guide.html 27 Sep 2002 15:45:06 -0000 1.7 +++ appl_guide.html 6 Jan 2003 05:10:13 -0000 1.8 @@ -102,6 +102,7 @@ pslResult step () ; pslResult trace () ; + int compile ( const char *memptr, const char *fname ) ; int compile ( const char *fname ) ; int compile ( FILE *fd ) ; } ; @@ -143,10 +144,18 @@ choose to ignore any compilation errors - but executing the resulting program will immediately produce a PSL_PROGRAM_END. <p> -You can pass either a filename or a 'FILE *' descriptor to the compiler, -if you do the former, then error messages will refer to the name of the -file - if you do the latter then the program name that you passed to the -constructor function will be reported. +You can pass to the compiler either: +<ol> +<li> The filename of the file containing the PSL source code...or... +<li> A 'FILE *' descriptor for the file containing the PSL source...or... +<li> The address of a null terminated string containing the + program source PLUS a name to use for the program when reporting + errors, etc. +</ol> +If you pass the filename (1) or the address of the source with a name (3), +then error messages from PSL will refer to that name. But if you pass a +file destriptor then the program name that you passed to the constructor +function will be reported. <p> Applications that would like to report scripting errors in a more elegant way, may register a callback function that will be called whenever there @@ -186,7 +195,7 @@ <li> The 'message' parameter is the actual text of the error message. </ul> Notice that at compiletime, the 'progname' parameter is the name of the -file being compiled (if that's known to the compiler). Since it's +file or string being compiled (if that's known to the compiler). Since it's possible for one PSL source file to '#include' another, you should always use the 'progName' parameter in your error messages in preference to <code>prog->getProgName()</code> member function. |