www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Reviewing syntax highlight support in cgdb

reply Iain Buclaw <ibuclaw gdcproject.org> writes:
Hi,

I'm currently making changes to cgdb, and would like to have 
someone give a quick view over the lexer rules.

https://github.com/cgdb/cgdb/blob/master/lib/tokenizer/dlexer.l

Having a skim over myself, I see  nogc needs adding, and probably 
c_long, cpp_long and other ABI compatibility types that the 
compiler recognises.

Anything else missing? Could be any feature, not just keywords.

Iain.
Nov 14 2015
next sibling parent reply Brian Schott <briancschott gmail.com> writes:
On Saturday, 14 November 2015 at 10:44:53 UTC, Iain Buclaw wrote:
 Hi,

 I'm currently making changes to cgdb, and would like to have 
 someone give a quick view over the lexer rules.

 https://github.com/cgdb/cgdb/blob/master/lib/tokenizer/dlexer.l

 Having a skim over myself, I see  nogc needs adding, and 
 probably c_long, cpp_long and other ABI compatibility types 
 that the compiler recognises.

 Anything else missing? Could be any feature, not just keywords.

 Iain.
I'm guessing the best way to test this would be to check out and build your fork?
Nov 14 2015
parent Iain Buclaw <ibuclaw gdcproject.org> writes:
On Saturday, 14 November 2015 at 11:39:12 UTC, Brian Schott wrote:
 On Saturday, 14 November 2015 at 10:44:53 UTC, Iain Buclaw 
 wrote:
 Hi,

 I'm currently making changes to cgdb, and would like to have 
 someone give a quick view over the lexer rules.

 https://github.com/cgdb/cgdb/blob/master/lib/tokenizer/dlexer.l

 Having a skim over myself, I see  nogc needs adding, and 
 probably c_long, cpp_long and other ABI compatibility types 
 that the compiler recognises.

 Anything else missing? Could be any feature, not just keywords.

 Iain.
I'm guessing the best way to test this would be to check out and build your fork?
The downloading the latest release should be enough, you should have it available on whatever flavour of Linux you prefer. Shouldn't need to checkout the fork unless you want to help out with testing or want to build a testsuite for support. I haven't began to make any changes yet. And actually am looking at how much work it would be to switch the backend driver over from the old annotate interface to gdb/mi.
Nov 14 2015
prev sibling parent reply Jacob Carlborg <doob me.com> writes:
On 2015-11-14 11:44, Iain Buclaw wrote:
 Hi,

 I'm currently making changes to cgdb, and would like to have someone
 give a quick view over the lexer rules.

 https://github.com/cgdb/cgdb/blob/master/lib/tokenizer/dlexer.l

 Having a skim over myself, I see  nogc needs adding, and probably
 c_long, cpp_long and other ABI compatibility types that the compiler
 recognises.

 Anything else missing? Could be any feature, not just keywords.
Keywords: * __parameters * macro Strings: * Delimited string * Token string * Seems to be missing most escape sequences Other: __FILE__ and all related special constants -- /Jacob Carlborg
Nov 15 2015
parent reply Iain Buclaw via Digitalmars-d <digitalmars-d puremagic.com> writes:
On 15 November 2015 at 17:02, Jacob Carlborg via Digitalmars-d <
digitalmars-d puremagic.com> wrote:

 On 2015-11-14 11:44, Iain Buclaw wrote:

 Hi,

 I'm currently making changes to cgdb, and would like to have someone
 give a quick view over the lexer rules.

 https://github.com/cgdb/cgdb/blob/master/lib/tokenizer/dlexer.l

 Having a skim over myself, I see  nogc needs adding, and probably
 c_long, cpp_long and other ABI compatibility types that the compiler
 recognises.

 Anything else missing? Could be any feature, not just keywords.
Keywords: * __parameters * macro
'macro' is a reserved word, not a keyword. I'd accept anything that is valid code. :-)
 Strings:

 * Delimited string
 * Token string
This is tricky. And I'd expect it would need a smarter lexing technology to pull it off.
 * Seems to be missing most escape sequences
Not particularly bothered about having a special highlight for espace sequences, but nice suggestion all the same.
 Other:

 __FILE__ and all related special constants
OK. Added them all under literals.
Nov 15 2015
parent reply Jacob Carlborg <doob me.com> writes:
On 2015-11-15 18:41, Iain Buclaw via Digitalmars-d wrote:

 Not particularly bothered about having a special highlight for espace
 sequences, but nice suggestion all the same.
I Only mentioned these as I noticed you had "\n" and "\r" in the above linked file. But perhaps that was for another reason. -- /Jacob Carlborg
Nov 15 2015
parent Iain Buclaw via Digitalmars-d <digitalmars-d puremagic.com> writes:
On 15 November 2015 at 20:54, Jacob Carlborg via Digitalmars-d <
digitalmars-d puremagic.com> wrote:

 On 2015-11-15 18:41, Iain Buclaw via Digitalmars-d wrote:

 Not particularly bothered about having a special highlight for espace
 sequences, but nice suggestion all the same.
I Only mentioned these as I noticed you had "\n" and "\r" in the above linked file. But perhaps that was for another reason.
I suspect highlighting things that span multiple lines. :-)
Nov 15 2015