parser state



On 11/27/2013 12:18 PM, Leo Butler wrote:
>>    From: Robert Dodier <robert.dodier at gmail.com>
>>    Date: Wed, 27 Nov 2013 19:34:08 +0000
>>
>>    On 2013-11-27, Leo Butler <l_butler at users.sourceforge.net> wrote:
>>
>>    > Is there a way to inspect the state of the parser that I am missing?
>>    > Specifically, I would like to have access to the string of characters
>>    > that constitute a line of input.
>>
>>    Well, __ (i.e. two underbars) is the input expression currently being
>>    evaluated, and _ (one underbar) is the previous input expression.
>>    Dunno if that helps.
> No. These contain input expressions after the parser and reader have
> processed them. I want to intercept characters as the parser reads
> them. And, ideally, I would like to monitor the parser's state as it
> parses.
>
> Leo
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
You could look at the calls to the lisp programs... redefine or 
intercept readchar  or whatever
low-level i/o primitive is used.

I'm not sure why you need this, but you might also consider
using a whole different program that then feeds lines maxima
via  batch().