After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 312577 - syntax file for the Pike language
syntax file for the Pike language
Status: RESOLVED INCOMPLETE
Product: gtksourceview
Classification: Platform
Component: Syntax files
1.2.x
Other All
: Normal enhancement
: ---
Assigned To: GTK Sourceview maintainers
GTK Sourceview maintainers
Depends on:
Blocks:
 
 
Reported: 2005-08-04 13:17 UTC by lance dillon
Modified: 2009-12-29 14:35 UTC
See Also:
GNOME target: ---
GNOME version: 2.7/2.8


Attachments
syntax file for the Pike language (3.80 KB, text/plain)
2005-08-04 13:18 UTC, lance dillon
Details
test pike file (4.33 KB, text/plain)
2005-08-05 00:11 UTC, lance dillon
Details

Description lance dillon 2005-08-04 13:17:02 UTC
A new syntax file for the Pike language

Other information:
Comment 1 lance dillon 2005-08-04 13:18:19 UTC
Created attachment 50229 [details]
syntax file for the Pike language
Comment 2 lance dillon 2005-08-04 14:22:38 UTC
Comment on attachment 50229 [details]
syntax file for the Pike language

><?xml version="1.0" encoding="UTF-8"?>
><!DOCTYPE language SYSTEM "language.dtd">
><language _name="Pike" version="1.0" _section="Sources" mimetypes="text/x-pike;text/x-pikesrc">
>	
>	<escape-char>\</escape-char>
>
>	<line-comment _name = "Line Comment" style= "Comment">
>		<start-regex>//</start-regex>
>	</line-comment>
>
>	<block-comment _name = "Block Comment" style = "Comment">
>		<start-regex>/\*</start-regex>
>        	<end-regex>\*/</end-regex>
>	</block-comment>
>
>	<block-comment _name = "'#if 0' Comment" style = "Comment">
>		<start-regex>^[ \t]*#[ \t]*if[ \t]*0</start-regex>
>        	<end-regex>[ \t]*#[ \t]*(endif|else)</end-regex>
>	</block-comment>
>
>	<string _name = "String" style = "String" end-at-line-end = "TRUE">
>		<start-regex>&quot;</start-regex>
>		<end-regex>&quot;</end-regex>
>	</string>
>
>	<syntax-item _name = "Include/Pragma" style = "Preprocessor">
>		<start-regex>^#[ \t]*(include|pragma)</start-regex>
>	         <end-regex>\n</end-regex>
>	</syntax-item>
>
>	<keyword-list _name = "Keywords" style = "Keyword" case-sensitive="TRUE">
>		<keyword>break</keyword>
>		<keyword>case</keyword>
>		<keyword>catch</keyword>
>		<keyword>continue</keyword>
>		<keyword>default</keyword>
>		<keyword>do</keyword>
>      		<keyword>else</keyword>
>		<keyword>for</keyword>
>		<keyword>foreach</keyword>
>		<keyword>gauge</keyword>
>		<keyword>goto</keyword>
>		<keyword>if</keyword>
>		<keyword>import</keyword>
>		<keyword>inherit</keyword>
>		<keyword>private</keyword>
>		<keyword>return</keyword>
>		<keyword>sizeof</keyword>
>		<keyword>switch</keyword>
>		<keyword>throw</keyword>
>		<keyword>try</keyword>
>		<keyword>typeof</keyword>
>		<keyword>while</keyword>
>	</keyword-list>
>
>	<keyword-list _name = "Types" style = "Data Type" case-sensitive="TRUE">
>		<keyword>array</keyword>
>		<keyword>constant</keyword>
>      		<keyword>enum</keyword>
>		<keyword>float</keyword>
>		<keyword>int</keyword>
>		<keyword>mapping</keyword>
>		<keyword>mixed</keyword>
>		<keyword>multiset</keyword>
>		<keyword>object</keyword>
>		<keyword>optional</keyword>
>		<keyword>static</keyword>
>		<keyword>string</keyword>
>		<keyword>void</keyword>
>	</keyword-list>
>
>	<string _name = "Array" style = "String" end-at-line-end = "FALSE">
>		<start-regex>\(\{</start-regex>
>		<end-regex>\}\)</end-regex>
>	</string>
>
>	<string _name = "Mapping" style = "String" end-at-line-end = "FALSE">
>		<start-regex>\(\[</start-regex>
>		<end-regex>\]\)</end-regex>
>	</string>
>
>	<string _name = "Multiset" style = "String" end-at-line-end = "FALSE">
>		<start-regex>\(&lt;</start-regex>
>		<end-regex>&gt;\)</end-regex>
>	</string>
>
>	<string _name = "Character Constant" style = "String" end-at-line-end = "TRUE">
>		<start-regex>&apos;</start-regex>
>		<end-regex>&apos;</end-regex>
>	</string>
>
>	<pattern-item _name = "Decimal" style = "Decimal">
>		<regex>\b([1-9][0-9]*|0)([Uu]([Ll]|LL|ll)?|([Ll]|LL|ll)[Uu]?)?\b</regex>
>	</pattern-item>
>
>	<pattern-item _name = "Floating Point Number" style = "Floating Point">
>		<regex>\b([0-9]+[Ee][-]?[0-9]+|([0-9]*\.[0-9]+|[0-9]+\.)([Ee][-]?[0-9]+)?)[fFlL]?</regex>
>	</pattern-item>
>
>	<pattern-item _name = "Octal Number" style = "Base-N Integer">
>		<regex>\b0[0-7]+([Uu]([Ll]|LL|ll)?|([Ll]|LL|ll)[Uu]?)?\b</regex>
>	</pattern-item>
>
>	<pattern-item _name = "Hex Number" style = "Base-N Integer">
>		<regex>\b0[xX][0-9a-fA-F]+([Uu]([Ll]|LL|ll)?|([Ll]|LL|ll)[Uu]?)?\b</regex>
>	</pattern-item>
>
>	<keyword-list _name = "Preprocessor Definitions" style = "Preprocessor" case-sensitive="TRUE"
>		match-empty-string-at-beginning = "FALSE"
>		match-empty-string-at-end = "TRUE"
>		beginning-regex = "^[ \t]*#[ \t]*">
>		<keyword>if</keyword>
>		<keyword>ifdef</keyword>
>		<keyword>ifndef</keyword>
>		<keyword>else</keyword>
>		<keyword>elif</keyword>
>		<keyword>define</keyword>
>		<keyword>endif</keyword>
>		<keyword>undef</keyword>
>		<keyword>error</keyword>
>		<keyword>pragma</keyword>
>		<keyword>line</keyword>
>	</keyword-list>
>
></language>
Comment 3 Paolo Borelli 2005-08-04 20:56:14 UTC
forgive my ignorance, but I don't know pike :)

Can you attach a couple of sample files to test the highlighting?

thanks
Comment 4 lance dillon 2005-08-05 00:11:47 UTC
Created attachment 50251 [details]
test pike file

Can you add a keyword, too?  It is lambda, just under the keywords heading
(like "if" and "switch") will be fine.
Comment 5 Paolo Maggi 2005-12-30 17:27:48 UTC
It seems text/x-pike and/or text/x-pikesrc are not registered mime-types in shared-mime-info.

Lance: Please, file a request for the addition of the mime type to
https://bugs.freedesktop.org, shared-mime-info product.
Comment 6 Paolo Maggi 2006-07-26 10:27:40 UTC
Lance: any news about the mime-type?
Comment 7 Ignacio Casal Quinteiro (nacho) 2009-11-26 23:47:37 UTC
Now we support globs, so if you want to update the lang file to the 2.0 version would be great.
Comment 8 Paolo Borelli 2009-12-29 14:35:06 UTC
I am closing this for now, feel free to reopen if you attach a new file in the new format.