in reply to Re^4: Thanks to Ikegami, Chromatic & Corion
in thread Thanks to Ikegami, Chromatic & Corion
c as in "curved"
Changing the specials from lower to uppercase would be quite easy, perhaps it would be better to support both? Or would that be confusing?
I'm going to add that sub escape in the parser right now as I think it will be a lot faster than how I'm currently doing it:
$aXML =~ s@&lab;@\<@gs; $aXML =~ s@&rab;@\>@gs; $aXML =~ s@&lcb;@\(@gs; $aXML =~ s@&rcb;@\)@gs; $aXML =~ s@&lsb;@\[@gs; $aXML =~ s@&rsb;@\]@gs;
Oh, btw there is also another special and token which I haven't mentioned yet.
pseudocode ---------- $aXML =~ s@`@<backtick>@gs; while ( commands remain unprocessed ) { foreach match for <any_command> { substitute for <`any_command> set found_command boolean flag true } if (found_command) { while ( find match for <`command>data</command> ) { process if ( no nested ` chars found ) } } }
The reason for that is so that it forces the tags to be computed innermost to outermost, by negating the ` control char. Also the parser does not proceed to the lower priority tag types until all of the higher types have been processed.
File inclusions restart the parser so that they can have a complete new tag hierarchy within them, which can then include another hierarchy and so on recursively.
I suspect the backtick char (and tag) probably won't be needed at all by a proper compiler.
I also have some ideas about an editor for aXML, as far as I can tell it should be possible to run tags in isolation right inside the editor to see what they output.
So if we have a bit of aXML like
<baz><qd>foo</qd></baz>
And we give the editor a query in like an address bar at the top;
?foo=barThen right clicking foo could run the plugin and return the result right there.
<baz>bar</baz>
This would make debugging really easy and quick! If "bar" is not what your expecting to get from the tag then you know the problem is with the plugin. If "bar" is correct, then you can click on one tag outwards to execute that and see what it does... and so on interactively.
It would beat the hell out of having to swap between browser and editor windows constantly to see what is going on, and say a double right click could restore it back to its original state.
opening up an inc tag like that would load the appropriate file, ready for editing, then when you click back to close it again the editor can automatically save the secondary file for you. This way you can navigate and traverse complex structures and hierarchies without having to load, save and close files manually.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: Thanks to Ikegami, Chromatic & Corion
by ikegami (Patriarch) on Nov 02, 2011 at 04:56 UTC | |
by Logicus (Initiate) on Nov 02, 2011 at 13:38 UTC | |
by ikegami (Patriarch) on Nov 02, 2011 at 19:50 UTC | |
by Logicus (Initiate) on Nov 02, 2011 at 20:56 UTC | |
by ikegami (Patriarch) on Nov 02, 2011 at 23:58 UTC | |
|