The examples are correct, when they are copy-pasted into a .gmic command file :
foo :
image.jpg (1,2,3;4,5,6;7,8,9) (255^128^64) 400,400,1,3,'(x>w/2?x:y)*c'
will work as expected.
These examples are examples of use of the G’MIC language, not examples of shell commands.
There’s no point in giving examples of command lines running in a terminal if you don’t say which terminal it is (there are dozens of different terminals, each with its own specific features).
For a reference documentation, it is just not possible to give example that are working with all possible terminals. It’s not a question of ‘it should be working’, or not. It is just not possible to have this.