My solution for my REPL is very simple; I use two consecutive semicolons to indicate the end of input; and I don't evaluate the input until I see it.
I just accumulate input lines, removing any newlines until I see my ad-hoc end-of-input indicator and then evaluate the entire expression. It is far simpler than trying to determine whether what you've got so far constitutes a complete expression.
In reply to Re: howto parse (or determining end) of a line of perl
by BrowserUk
in thread howto parse (or determining end) of a line of perl
by perl-diddler
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |