Ok, I started work and I can Lex most scripts fairly well. (My profile and configure.gnu, that means.) My only problem now is that when I have plain word, such as the echo in this command:
echo 'foo bar'
The echo is greedy and grabs the tokens after. For instance:
& && ( ) \n
;; ; | ||
< > << >> <>
<& >& <<- >|
Are counted part of the word, when they should not be.
Anyone know a regex for finding, from the start of $_, a string that does not contain these characters? Also, it needs to be able to backslash these characters.