colis-anr / morbig

A static parser for POSIX Shell
Other
190 stars 8 forks source link

Fatal error: exception Morbig.PrelexerState.NotAWord("OPERATOR(Semicolon)") #58

Closed jwilk closed 5 years ago

jwilk commented 5 years ago

This shell script

echo ${1#;}

makes morbig die with fatal error:

Fatal error: exception Morbig.PrelexerState.NotAWord("OPERATOR(Semicolon)")

As I understand it, ${1#;} is not valid POSIX syntax (the semicolon should be quoted), even though the shells I tried don't seem to mind it.

Tested with git master (bb63f9e0297dcce321499e8e42b7ea31bbf056c3).

Niols commented 5 years ago

Hello, the same thing happens with the following words: ${bar#(} and ${bar%)} giving:

respectively.