* @license http://opensource.org/licenses/GPL-2.0 GNU Public License */ abstract class Fragment { /** * Parses the tokens contained in the given list in the context of the given * parser. * * @param Parser $parser The parser that serves as context. * @param TokensList $list The list of tokens that are being parsed. * @param array $options Parameters for parsing. * * @return mixed */ public static function parse(Parser $parser, TokensList $list, array $options = array()) { return null; } /** * Builds the string representation of a fragment of this type. * * @param Fragment $fragment The fragment to be built. * * @return string */ public static function build(Fragment $fragment) { return null; } }