Bruce Korb <[EMAIL PROTECTED]> writes: > That read function reads an s-expr. How can that work if > the non-Scheme text in the file is not an s-expr? I don't see another > function for getting text from a port. Am I missing something? > Especially troubling is the phrase, "Any whitespace before the > next token is discarded." I do not want tokenized input. I want raw > text. I have my own methods for determining when something needs > a Scheme evaluation.
That the input file does not contain only Scheme source wasn't clear to me. Then, in fact, it would make sense to use `scm_c_eval_string ()', provided your tool is able to determine the boundaries of the Scheme expression (if it's not, you'd better use `scm_read ()'). After the `scm_c_eval_string ()', you can `printf ()' whatever location information you want. If you want to use source locations in a Guile-friendly way (so that Guile can, for instance, display location information in backtraces), then you may want to use `scm_set_source_property_x (sexp, key, datum)' (where KEY may be one of SCM_SYM_FILENAME, SCM_SYM_LINE, SCM_SYM_COLUMN) which is defined in `srcprop.h'. But again, this is a problem (and a solution) relevant to your tool, not to Guile in general. Thanks, Ludovic. _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://lists.gnu.org/mailman/listinfo/guile-devel