Alvaro Lopez Ortega dijo [Tue, Jan 13, 2009 at 07:19:48PM +0100]:
>
> <!-- WARNING --><technical>
> [ ... ]
> (phew! Techstuff-folding mail clients are good! :) )
> <!-- WARNING --></technical>
>
> So, I'd personally wouldn't try to write a translator without
> following this sort of lexical/syntactic parser scheme. Doing so would
> be a hell of a work, but IMHO it's the only way to success.
I'd just add, if and only if this translator is meant to be
comprehensive and exhaustive. You can get quite far on a best-effort
basis. I think Iván's approach is quite sensible: Do what is most
boring, easiest to parse, and expect the sysadmin to have something
behind the forehead.
Maybe even better would be to present some output report, just showing
line by line what was translated and what was _not_. Something like
this, although trivial, can make lots of sense:
------------------------------------------------------------
#<VirtualHost 132.248.72.141:80>
ServerAdmin [email protected]
ServerAlias somesite
# ServerName somesite.example.org
ProxyPass / http://127.0.0.1:8001/
ProxyPassReverse / http://127.0.0.1:8001
ProxyPreserveHost on
ProxyPass /images !
ProxyPass /stylesheets !
Alias /images /home/webapp/somesite/public/images
Alias /stylesheets /home/webapp/somesite/public/stylesheets
# ErrorLog /var/log/apache2/directorio.iiec.unam.mx-error.log
LogLevel Warn
# CustomLog /var/log/apache2/directorio.iiec.unam.mx-access.log combined
#</VirtualHost>
------------------------------------------------------------
Of course, for bonus points (and showing how this works), pointers to
the line where this command is reflected (i.e. #50:) would even be
better.
Perfection cannot be attained. Don't aim for it!
--
Gunnar Wolf - [email protected] - (+52-55)5623-0154 / 1451-2244
PGP key 1024D/8BB527AF 2001-10-23
Fingerprint: 0C79 D2D1 2C4E 9CE4 5973 F800 D80E F35A 8BB5 27AF
_______________________________________________
Cherokee mailing list
[email protected]
http://lists.octality.com/listinfo/cherokee