Please refer to xtra/pgscript/doc/developers.html for the pgScript developer documentation. parser.sh must be called for regenerating Flex and Bison source files because it does some more processing than just executing Bison and Flex: it replaces some headers and add other ones. Please use Flex 2.5.33 otherwise the pgadmin/include/pgscript/FlexLexer.h file will not be valid. If you use a different version from 2.5.33 you need to copy FlexLexer.h that comes along with your Flex distribution to pgadmin/include/pgscript.