Usually, if there is a token that is a prefix of another the longer token wins. For example, in Javascript --x is parsed as the decrement operator instead of as two unary "-" operators.
edit: I guess because "01" isn't a valid token.
The parent was talking about js.