« home   paste   Anonymous | Login | Signup for a new account 06-21-2019 01:27 CEST
* X »
GeSHi - Generic Syntax Highlighter Syntax Coloriser for PHP

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0000113 [GeSHi] lang feature N/A 03-21-07 02:17 06-04-07 00:22
Reporter Knut View Status public  
Assigned To
Priority low Resolution open  
Status new   Product Version 1.1.2alpha3
Summary 0000113: GeSHi 1.0 to 1.2 language converter
Description The idea is to have a script that is able to convert compliant v1.0 language files (arrays) converted to 1.2 ones (GeSHiContext object).
Additional Information This could be useful for making a 1.0 language work in 1.1, giving more reasons to migrate, as you get better backward-compitability. The script will generate childs for each array element, and properties for others. It will also generate a theme file.
Attached Files

- Relationships

- Notes
06-03-07 03:16

Because of the format that is quite different among the different versions such a conversion might not be as trivial as one could think.

Having a short look at the language layout of the two Delphi languages files I noticed at least 3 problems:
1. The old format lecks descriptive identifiers for the stuff it stores. That way all keywords\reserved words would be rewritten as keyword0, keyword1, ... and so on. A manual post-processing and adoption would therefore be a lot of work.

2. Regular expression use is discouraged in 1.2, but wasn't in 1.0 thus the produced language files would violate that new policy unless they are adapted afterwards (see point 1)

3. The new theme format introduces some assumptions regarding naming conventions of context (e.g. how numbers and keyword contexts are structured). This is an information that is missing in the old format where this information was only available internally as numbers were handled with regexps internally (cf. 2.).

This is only a short list of incompatibilities between the two versions, which could be continued a lot more.

IMHO language files for 1.2 should be rewritten from scratch (maybe copying parts of the old ones) introducing new features instead of just copying old stuff and trying to make it compatible with a system that is by not compatible by definition. New features like contextual structuring of the language are much more performant than having a monolitic language file like used for most available 1.0 languages. I don't see much a point in introducing countless languages into 1.2 that won't be used at all. For most languages 1.0 is already sufficient; for those it isn't 1.2 is the choice.
06-04-07 00:22
edited on: 06-04-07 00:25

Cross-Link to a simular issue on SourceForge Tracker ...
https://sourceforge.net/tracker/index.php?func=detail&aid=1219115&group_id=114997&atid=670234 [^]

Small note regarding this from the #GeSHi channel:
[10:51:13] BenBE: Knut suggested such an auto-converter script there a while ago ...
[10:51:52] waawaamilk: yep. they should be written manually
[10:52:02] waawaamilk: however, I think I will drop the requirement for language files to have an author
[10:52:19] waawaamilk: it can just go into svn as is, if people find problems they can submit patches
[10:53:15] BenBE: Well, that's my oppinion too; it's only that there should be someone caring about that language and supporting it further ...
[10:54:18] waawaamilk: nah, I think that will mean people will not want to commit
[10:54:30] waawaamilk: once you have a language mostly right, it won't need any serious work
[10:54:40] waawaamilk: I'm happy for it to continue the same way 1.0.X has
[10:54:48] waawaamilk: people can submit bugs/patches etc if they want
[11:13:23] BenBE: Well I don't have anything agains people committing bugfixes, but new languages should still have someone that cares about the language and makes it "production quality" ...
[11:14:01] BenBE: I simply have something agains incomplete language files like it was the case with Delphi language which was far from working ...
(Times as usual using GMT+0100)


- Issue History
Date Modified Username Field Change
03-21-07 02:17 Knut New Issue
04-05-07 05:04 Knut Category optimisations => lang
04-05-07 05:04 Knut Additional Information Updated
06-03-07 03:16 BenBE Note Added: 0000518
06-04-07 00:22 BenBE Note Added: 0000519
06-04-07 00:25 BenBE Note Edited: 0000519


Mantis 1.0.0rc2[^]
Copyright © 2000 - 2005 Mantis Group
34 total queries executed.
27 unique queries executed.
Powered by Mantis Bugtracker