a pretty working script enum parser!