From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Richard F Weber" To: sourcenav@sourceware.cygnus.com Subject: New Parser/highlighter howto Date: Mon, 02 Apr 2001 05:59:00 -0000 Message-id: <3AC8779E.8080900@link.com> X-SW-Source: 2001-q2/msg00002.html Ok, granted I'm a bit new to Source navigator and hacking on the API, but here it goes. I'm working on creating an Ada Parser/Highlighter. I know another company (CAS I think) is supposed to have an Ada parser, but I've contacted them on numerous occasions by phone & e-mail and they don't seem to want to respond. So, as a result, I'm looking to hack out an Ada parser on my own. I've found the grammer9x.y & lexer9x.l files from a mirror of the falls-church Ada site to give a basic start as to how to parse out Ada. Now I'm just trying to work on actually getting something working. So my question is: 1) How does the color highlighter exactly work for SN? Does it use the parser to identify what is a comment, what is a function, etc? Or do I have to code the syntax checking in separately (ala VIM) 2) Testing parser offline. Is there a way to test the parser offline to make sure the database is getting what I think it's getting? I've got the lex code checking and handling comments right now, but the syntax highlighter doesn't highlight the right code as a comment. So I'm not sure if I'm doing this stuff right. Any pointers would be very much appreciated. I've kind of looked at the chill & python lexer's, but they seem a bit advanced for me. Of course, if there's a perl module that interfaces with the SN API calls I could probobally whip something out quicker (but I'm not sure how to make Perl interface with C ) Thanks in advance. --Rich