Re: [Parser-devel] [token.c] Test case update
Status: Beta
Brought to you by:
jineshkj
From: Noam P. <npo...@uw...> - 2006-09-27 03:20:21
|
Jinesh K J wrote: >> So you're saying escapes only occur within quotes? I'm not sure that >> this makes sense: what if you wanted to put in a quote at then end of a >> token, eg [hello\" world] -> [hello"] > If someone want to use a quote, then let them use them inside a quote. > For the above case that you've mentioned, the solution would be: > > ["hello\""] -> [hello"] > or > ['hello"'] -> [hello"] > > What do you think? > Ok, I guess I was confused because I was looking at the test cases with the shell, (using echo "foo") to get rid of the backslashes. I've updated the repository so all the test cases now work. I think the next thing to do is handle invalid input: eg unclosed quotes, right now that causes a segfault. I'm not sure what the appropriate way of signalling an error would be. Noam |