bulk of the fragment parsing code moved to lexer. package