It's a copyright violation if it isn't cleanroom, that means you don't get to re-license it under different terms. It will count as a derivative work under copyright law.
I'm sorry but this doesn't make any sense. If you merely read the code for another open source implementation before implemented something totally different that shares a separate publicly documented configuration language it's derivative. I'd be appalled at a judgment that upheld that view.