kervinck / gigatron-rom

System, apps and tooling for the Gigatron TTL microcomputer
BSD 2-Clause "Simplified" License
235 stars 80 forks source link

Created syntax highlighting for Gedit/Pluma/Xed #154

Closed xopr closed 4 years ago

xopr commented 4 years ago

Note that these files are not within the Contrib folder.

When trying to study all of the gcl examples in Pluma, I noticed I could really use syntax highlighting, so I did some research, inspired by the vim syntax, interface.json and working examples, I put together a GtkSourceView language file that Gedit, Pluma, and Xed can use.

It might need some additional work, but at first glance, it looks pleasant. This might also be too Linux specific, so let me know if I need to move it to Contrib.

kervinck commented 4 years ago

Without testing, looks legit to me. Be aware that gcl0x syntax is still changing on a whim from time to time.

xopr commented 4 years ago

Thanks for merging!

... Be aware that gcl0x syntax is still changing on a whim from time to time.

@kervinck Marcel, would gcl0x updates be visible in, say, something like interface.json or #80 ?

It might also be an idea to symlink the syntax file(s) to the proper location to force the latest version after a git pull (at least that's what I did).

kervinck commented 4 years ago

80 started as a brainstorm. I might as well close it. There is an annoying difficulty in handling the names for labels in a coherent manner. I'm not satisfied with how it works out now. Once I see the light, I will declare "gcl1" and freeze it.

Most reliable would be to follow Docs/GCL-language.txt. I make a serious effort to list the evolutionary changes as follows:

-------------------
Deprecated features
-------------------

i=              Alias for i: (was often used as \symbol=)
i#              Original notation for #i
X<++ X>++       Original notation for <X++ >X++
i<++ i>++       Original notation for <i++ >i++
ii:             Original notation for *=ii
i% i%=          Original notation for %i %i=
i!              Original notation for i!! (will only be depricated in gcl1)
i?              Original notation for i?? (will only be depricated in gcl1)
kervinck commented 4 years ago

The names and values in interface.json aren't supposed to change. Only new additions.