Hi,
I have some custom programming languages (Lowtalk for low-level programming, and Dastrel for GPU shaders) whose grammar are defined by using PetitParser.
How can I add syntax highlighting support for them by using the GTInspector?
Best regards, Ronie
Hi,
Thanks for the ping :).
Please take a look at the Pillar syntax highlighter. You can find it in the following way:
- Download Pillar: Gofer new smalltalkhubUser: 'Pier' project: 'Pillar'; configuration; loadDevelopment. - Browse GTPillarHighlighterTextDecorator (this is what hooks the parser with Rubric) GTPillarHighlighter (this is the parser that produces syntax highlighting)
Please let me know if you have issues with this.
Cheers, Doru
On Sep 12, 2017, at 12:11 PM, Ronie Salgado roniesalg@gmail.com wrote:
Hi,
I have some custom programming languages (Lowtalk for low-level programming, and Dastrel for GPU shaders) whose grammar are defined by using PetitParser.
How can I add syntax highlighting support for them by using the GTInspector?
Best regards, Ronie _______________________________________________ Moose-dev mailing list Moose-dev@list.inf.unibe.ch https://www.list.inf.unibe.ch/listinfo/moose-dev
-- www.tudorgirba.com www.feenk.com
"Every successful trip needs a suitable vehicle."
Hi Doru,
Thanks for the response. I managed to make the following:
[image: Imágenes integradas 1] [image: Imágenes integradas 2]
The only problem with this is that I end duplicating some logic, and that it could also be not easy for supporting the different themes. Maybe I should try making a syntax highlighting framework that can use either, PetitParser grammars, or regular expressions for basic support of languages as C/C++/Java (comments, keyword, identifiers, literals).
Best regards, Ronie
2017-09-12 14:26 GMT+02:00 Tudor Girba tudor@tudorgirba.com:
Hi,
Thanks for the ping :).
Please take a look at the Pillar syntax highlighter. You can find it in the following way:
- Download Pillar: Gofer new smalltalkhubUser: 'Pier' project: 'Pillar';
configuration; loadDevelopment.
- Browse GTPillarHighlighterTextDecorator (this is what hooks the parser
with Rubric) GTPillarHighlighter (this is the parser that produces syntax highlighting)
Please let me know if you have issues with this.
Cheers, Doru
On Sep 12, 2017, at 12:11 PM, Ronie Salgado roniesalg@gmail.com wrote:
Hi,
I have some custom programming languages (Lowtalk for low-level
programming, and Dastrel for GPU shaders) whose grammar are defined by using PetitParser.
How can I add syntax highlighting support for them by using the
GTInspector?
Best regards, Ronie _______________________________________________ Moose-dev mailing list Moose-dev@list.inf.unibe.ch https://www.list.inf.unibe.ch/listinfo/moose-dev
-- www.tudorgirba.com www.feenk.com
"Every successful trip needs a suitable vehicle."
Moose-dev mailing list Moose-dev@list.inf.unibe.ch https://www.list.inf.unibe.ch/listinfo/moose-dev
On Wed, Sep 13, 2017 at 2:28 PM, Ronie Salgado roniesalg@gmail.com wrote:
Hi Doru,
Thanks for the response. I managed to make the following: ... The only problem with this is that I end duplicating some logic, and that it could also be not easy for supporting the different themes. Maybe I should try making a syntax highlighting framework that can use either, PetitParser grammars, or regular expressions for basic support of languages as C/C++/Java (comments, keyword, identifiers, literals).
This sounds interesting. A nice syntax working off of PetitParser that I could use for SQL and COBOL would be where my interest would lie. (Do not feel obliged at all doing that (COBOL/SQL) part, but I would be interested in any syntax that you come up with for working with PetitParser grammers.)
-cbc
Best regards, Ronie
2017-09-12 14:26 GMT+02:00 Tudor Girba tudor@tudorgirba.com:
Hi,
Thanks for the ping :).
Please take a look at the Pillar syntax highlighter. You can find it in the following way:
- Download Pillar: Gofer new smalltalkhubUser: 'Pier' project: 'Pillar';
configuration; loadDevelopment.
- Browse GTPillarHighlighterTextDecorator (this is what hooks the parser
with Rubric) GTPillarHighlighter (this is the parser that produces syntax highlighting)
Please let me know if you have issues with this.
Cheers, Doru
On Sep 12, 2017, at 12:11 PM, Ronie Salgado roniesalg@gmail.com
wrote:
Hi,
I have some custom programming languages (Lowtalk for low-level
programming, and Dastrel for GPU shaders) whose grammar are defined by using PetitParser.
How can I add syntax highlighting support for them by using the
GTInspector?
Best regards, Ronie _______________________________________________ Moose-dev mailing list Moose-dev@list.inf.unibe.ch https://www.list.inf.unibe.ch/listinfo/moose-dev
-- www.tudorgirba.com www.feenk.com
"Every successful trip needs a suitable vehicle."
Moose-dev mailing list Moose-dev@list.inf.unibe.ch https://www.list.inf.unibe.ch/listinfo/moose-dev
Moose-dev mailing list Moose-dev@list.inf.unibe.ch https://www.list.inf.unibe.ch/listinfo/moose-dev
Sent: Wednesday, September 13, 2017 at 5:28 PM From: "Ronie Salgado" roniesalg@gmail.com To: "Moose-related development" moose-dev@list.inf.unibe.ch Subject: [Moose-dev] Re: Syntax highlighting for custom language on the GTInspector
Hi Doru, Thanks for the response. I managed to make the following:
The only problem with this is that I end duplicating some logic, and that it could also be not easy for supporting the different themes.
The solution I used for supporting different themes for XML and XPath highlighting was to reuse the current theme's Shout styles, like this:
SHTextStylerST80 new attributesFor: aShoutProperty
where aShoutProperty is something like #comment or #string. Not every language construct will have an equivalent in Pharo, so you may have to get creative.
Maybe I should try making a syntax highlighting framework that can use either, PetitParser grammars, or regular expressions for basic support of languages as C/C++/Java (comments, keyword, identifiers, literals). Best regards,Ronie
2017-09-12 14:26 GMT+02:00 Tudor Girba <tudor@tudorgirba.com[mailto:tudor@tudorgirba.com]>:Hi,
Thanks for the ping :).
Please take a look at the Pillar syntax highlighter. You can find it in the following way:
- Download Pillar: Gofer new smalltalkhubUser: 'Pier' project: 'Pillar'; configuration; loadDevelopment.
- Browse GTPillarHighlighterTextDecorator (this is what hooks the parser with Rubric) GTPillarHighlighter (this is the parser that produces syntax highlighting)
Please let me know if you have issues with this.
Cheers, Doru
On Sep 12, 2017, at 12:11 PM, Ronie Salgado <roniesalg@gmail.com[mailto:roniesalg@gmail.com]> wrote:
Hi,
I have some custom programming languages (Lowtalk for low-level programming, and Dastrel for GPU shaders) whose grammar are defined by using PetitParser.
How can I add syntax highlighting support for them by using the GTInspector?
Best regards, Ronie> _______________________________________________ Moose-dev mailing list Moose-dev@list.inf.unibe.ch[mailto:Moose-dev@list.inf.unibe.ch] https://www.list.inf.unibe.ch/listinfo/moose-dev%5Bhttps://www.list.inf.unib...]
-- www.tudorgirba.com[http://www.tudorgirba.com] www.feenk.com[http://www.feenk.com]
"Every successful trip needs a suitable vehicle."
Moose-dev mailing list Moose-dev@list.inf.unibe.ch[mailto:Moose-dev@list.inf.unibe.ch] https://www.list.inf.unibe.ch/listinfo/moose-dev____________________________... Moose-dev mailing list Moose-dev@list.inf.unibe.ch https://www.list.inf.unibe.ch/listinfo/moose-dev%5Bhttps://www.list.inf.unib...]