Functions for parser & core