Syntaxer 2.0.2 released

Published 25 March, 2007 in Misc - 0 Comments
This script is part of PLib

A few bugs was fixed in this release. I also noted a few new ones but that was mostly in the SyntaxMap class which gererates PHP arrays from the SyntaxMap files.

Changelog for this version

  • Fixed a bug where the end of strings (quotes) wasn’t found correctly in languages that has no escape character (like XSL, XML and HTML).
  • Also changed the Syntaxer::AutoDetect() method to return the extension of a file if no alias was found. In this way we can pass a path to the method and use the result directly as argument to `Sytaxer::__construct()`
4 lines of PHP
  1. $file = ‘/some/path/to/file.xsl’;
  2. $lang = Syntaxer::AutoDetect($file);
  3. $stx = new Syntaxer($lang);
  4. $stx>Parse(file_get_contents($file));

The Syntaxer can be read about and downloaded over here.