Comply with C++11 and improve lexer's performance

* Use c++11 instead of gnu++11 (disable GNU extensions).
* Disable platform-dependent lexer capabilities.
* Use strings instead of char*s.
* Reorganize code.