From: pix <pi...@te...> - 2007-03-02 05:57:18
|
hi, i've just been working on a python script to upload forth source files to amforth. it watches the character echo to do a kind of software flow control, and waits for a prompt after each line. to test it with different inputs, i've been using the files in blocks, and when i hit blocks/interrupts.frt i ran into what i think is a parser bug in amforth. when given a long sequence starting with a right bracket, after hitting enter, amforth basically goes crazy and needs to be reset. it gets triggered by the first line of blocks/interrupts.frt: ( make noop the default interrupt word ) as a test i made a file of different length leftbracket sequences: > ( xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ok > ( xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ok > ( xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ok > ( xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ok > ( xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx >^[[?1;2c^[[?1;2c the stuff at the end is amforth going squirrely and confusing my terminal. here is the same test but with closed bracket sequences: > ( xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ) ok > ( xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ) ok > ( xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ) ok > ( xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ) okøø ^[[?1;2c as you can see it doesn't matter if you close the sequence or not. this is with amforth 1.3 pix. |