phpDocumentor PHP_LexerGenerator
[ class tree: PHP_LexerGenerator ] [ index: PHP_LexerGenerator ] [ all elements ]

Source for file doit.php

Documentation is available at doit.php

  1. <?php
  2. require_once 'PHP/LexerGenerator/Parser.php';
  3. require_once 'PHP/LexerGenerator/Regex/Lexer.php';
  4. require_once 'PHP/LexerGenerator/Regex/Parser.php';
  5.    $a  "((@import\s+[\"'`]([\w:?=@&\/#._;-]+)[\"'`];)|";
  6.    $a .= "(:\s*url\s*\([\s\"'`]*([\w:?=@&\/#._;-]+)(?(R)1)";
  7.    $a .= "([\s\"'`]*\))|<[^>]*\s+(src|href|url)\=[\s\"'`]*";
  8.    $a .= "([\w:?=@&\/#._;-]+)[\s\"'`]*[^>]*>))";
  9. $parser new PHP_LexerGenerator_Regex_Parser($lex);
  10. $parser->PrintTrace();
  11. while ($lex->yylex()) {
  12.     $parser->doParse($lex->token$lex->value);
  13. }
  14. $parser->doParse(0,0);
  15. var_dump($parser->result);
  16. ?>

Documentation generated on Fri, 30 Jun 2006 12:31:01 -0400 by phpDocumentor 1.3.0