PageRenderTime 56ms CodeModel.GetById 43ms app.highlight 4ms RepoModel.GetById 5ms app.codeStats 0ms

/jEdit/tags/jedit-4-3-pre5/modes/prolog.xml

#
XML | 195 lines | 184 code | 3 blank | 8 comment | 0 complexity | 7ec1a37bd95cb54da48534d6ede71022 MD5 | raw file
  1<?xml version="1.0"?>
  2
  3<!DOCTYPE MODE SYSTEM "xmode.dtd">
  4
  5<!--	jEdit Prolog syntax file
  6	based on the INRIA ISO Prolog web page @ http://pauillac.inria.fr/~hodgson/prolog
  7
  8	written by	Giulio Piancastelli
  9	version		1.0
 10	created on	31st December 2001
 11	last revised	19th November 2002
 12-->
 13
 14<MODE>
 15	<PROPS>
 16		<PROPERTY NAME="lineComment" VALUE="%" />
 17		<PROPERTY NAME="commentStart" VALUE="/*" />
 18		<PROPERTY NAME="commentEnd" VALUE="*/" />
 19	</PROPS>
 20	<RULES ESCAPE="\" IGNORE_CASE="FALSE" HIGHLIGHT_DIGITS="TRUE">
 21	
 22		<!-- Comments -->
 23		<EOL_SPAN TYPE="COMMENT1">%</EOL_SPAN>
 24		<!--- ISO compliant C-style comments -->
 25		<SPAN TYPE="COMMENT1">
 26			<BEGIN>/*</BEGIN>
 27			<END>*/</END>
 28		</SPAN>
 29		
 30		<!-- String literals -->
 31		<SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
 32			<BEGIN>'</BEGIN>
 33			<END>'</END>
 34		</SPAN>
 35		<SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
 36			<BEGIN>"</BEGIN>
 37			<END>"</END>
 38		</SPAN>
 39		
 40		<!-- List literals -->
 41		<SPAN TYPE="LITERAL2" NO_LINE_BREAK="TRUE" DELEGATE="LIST">
 42			<BEGIN>[</BEGIN>
 43			<END>]</END>
 44		</SPAN>
 45		
 46		<!-- Operators -->
 47		<SEQ TYPE="OPERATOR">--&gt;</SEQ>
 48		<SEQ TYPE="OPERATOR">:-</SEQ>
 49		<SEQ TYPE="OPERATOR">?-</SEQ>
 50		<SEQ TYPE="OPERATOR">;</SEQ>
 51		<SEQ TYPE="OPERATOR">-&gt;</SEQ>
 52		<SEQ TYPE="OPERATOR">,</SEQ>
 53		<SEQ TYPE="OPERATOR">\+</SEQ> <!-- ISO Prolog uses it instead of 'not' -->
 54		<SEQ TYPE="OPERATOR">==</SEQ>
 55		<SEQ TYPE="OPERATOR">\==</SEQ>
 56		<SEQ TYPE="OPERATOR">\=</SEQ>
 57		<SEQ TYPE="OPERATOR">@&lt;</SEQ>
 58		<SEQ TYPE="OPERATOR">@=&lt;</SEQ>
 59		<SEQ TYPE="OPERATOR">@&gt;=</SEQ>
 60		<SEQ TYPE="OPERATOR">@&gt;</SEQ>
 61		<SEQ TYPE="OPERATOR">=..</SEQ>
 62		<SEQ TYPE="OPERATOR">=:=</SEQ>
 63		<SEQ TYPE="OPERATOR">=\=</SEQ>
 64		<SEQ TYPE="OPERATOR">=&lt;</SEQ>
 65		<SEQ TYPE="OPERATOR">&gt;=</SEQ>
 66		<SEQ TYPE="OPERATOR">+</SEQ>
 67		<SEQ TYPE="OPERATOR">-</SEQ>
 68		<SEQ TYPE="OPERATOR">/\</SEQ>
 69		<SEQ TYPE="OPERATOR">\/</SEQ>
 70		<SEQ TYPE="OPERATOR">//</SEQ>
 71		<SEQ TYPE="OPERATOR">&lt;&lt;</SEQ>
 72		<SEQ TYPE="OPERATOR">&lt;</SEQ>
 73		<SEQ TYPE="OPERATOR">&gt;&gt;</SEQ>
 74		<SEQ TYPE="OPERATOR">&gt;</SEQ>
 75		<SEQ TYPE="OPERATOR">**</SEQ>
 76		<SEQ TYPE="OPERATOR">^</SEQ>
 77		<SEQ TYPE="OPERATOR">\</SEQ>
 78		<SEQ TYPE="OPERATOR">/</SEQ>
 79		<SEQ TYPE="OPERATOR">=</SEQ>
 80		<SEQ TYPE="OPERATOR">*</SEQ>
 81		
 82		<!-- The '.' at the end of each clause -->
 83		<SEQ TYPE="OPERATOR">.</SEQ>
 84		
 85		<!-- Parentheses -->
 86		<SEQ TYPE="MARKUP">(</SEQ>
 87		<SEQ TYPE="MARKUP">)</SEQ>
 88		<SEQ TYPE="NULL">{</SEQ>
 89		<SEQ TYPE="NULL">}</SEQ>
 90		
 91		<KEYWORDS>
 92		
 93			<!-- Keywords that are 0 arity built-in predicates -->
 94			<KEYWORD1>true</KEYWORD1>
 95			<KEYWORD1>fail</KEYWORD1>
 96			<KEYWORD1>!</KEYWORD1> <!-- cut -->
 97			<KEYWORD1>at_end_of_stream</KEYWORD1>
 98			<KEYWORD1>nl</KEYWORD1>
 99			<KEYWORD1>repeat</KEYWORD1>
100			<KEYWORD1>halt</KEYWORD1>
101			
102			<!-- Keywords that are built-in predicates with arity greater than or equal to 1 -->
103			<FUNCTION>call</FUNCTION>
104			<FUNCTION>catch</FUNCTION>
105			<FUNCTION>throw</FUNCTION>
106			<FUNCTION>unify_with_occurs_check</FUNCTION>
107			<FUNCTION>var</FUNCTION>
108			<FUNCTION>atom</FUNCTION>
109			<FUNCTION>integer</FUNCTION>
110			<FUNCTION>float</FUNCTION>
111			<FUNCTION>atomic</FUNCTION>
112			<FUNCTION>compound</FUNCTION>
113			<FUNCTION>nonvar</FUNCTION>
114			<FUNCTION>number</FUNCTION>
115			<FUNCTION>functor</FUNCTION>
116			<FUNCTION>arg</FUNCTION>
117			<FUNCTION>copy_term</FUNCTION>
118			<FUNCTION>clause</FUNCTION>
119			<FUNCTION>current_predicate</FUNCTION>
120			<FUNCTION>asserta</FUNCTION>
121			<FUNCTION>assertz</FUNCTION>
122			<FUNCTION>retract</FUNCTION>
123			<FUNCTION>abolish</FUNCTION>
124			<FUNCTION>findall</FUNCTION>
125			<FUNCTION>bagof</FUNCTION>
126			<FUNCTION>setof</FUNCTION>
127			<FUNCTION>current_input</FUNCTION>
128			<FUNCTION>current_output</FUNCTION>
129			<FUNCTION>set_input</FUNCTION>
130			<FUNCTION>set_output</FUNCTION>
131			<FUNCTION>open</FUNCTION>
132			<FUNCTION>close</FUNCTION>
133			<FUNCTION>stream_property</FUNCTION>
134			<FUNCTION>at_end_of_stream</FUNCTION> <!-- arity 1 -->
135			<FUNCTION>set_stream_position</FUNCTION>
136			<FUNCTION>get_char</FUNCTION>
137			<FUNCTION>get_code</FUNCTION>
138			<FUNCTION>peek_char</FUNCTION>
139			<FUNCTION>peek_code</FUNCTION>
140			<FUNCTION>put_char</FUNCTION>
141			<FUNCTION>put_code</FUNCTION>
142			<FUNCTION>nl</FUNCTION> <!-- arity 1 -->
143			<FUNCTION>get_byte</FUNCTION>
144			<FUNCTION>peek_byte</FUNCTION>
145			<FUNCTION>put_byte</FUNCTION>
146			<FUNCTION>read_term</FUNCTION>
147			<FUNCTION>read</FUNCTION>
148			<FUNCTION>write_term</FUNCTION>
149			<FUNCTION>write</FUNCTION>
150			<FUNCTION>writeq</FUNCTION>
151			<FUNCTION>write_canonical</FUNCTION>
152			<FUNCTION>op</FUNCTION>
153			<FUNCTION>current_op</FUNCTION>
154			<FUNCTION>char_conversion</FUNCTION>
155			<FUNCTION>current_char_conversion</FUNCTION>
156			<FUNCTION>once</FUNCTION>
157			<FUNCTION>atom_length</FUNCTION>
158			<FUNCTION>atom_concat</FUNCTION>
159			<FUNCTION>sub_atom</FUNCTION>
160			<FUNCTION>atom_chars</FUNCTION>
161			<FUNCTION>atom_codes</FUNCTION>
162			<FUNCTION>char_code</FUNCTION>
163			<FUNCTION>number_chars</FUNCTION>
164			<FUNCTION>number_codes</FUNCTION>
165			<FUNCTION>set_prolog_flag</FUNCTION>
166			<FUNCTION>current_prolog_flag</FUNCTION>
167			<FUNCTION>halt</FUNCTION> <!-- arity 1 -->
168			
169			<!-- Mathematical functions -->
170			<FUNCTION>sin</FUNCTION>
171			<FUNCTION>cos</FUNCTION>
172			<FUNCTION>atan</FUNCTION>
173			<FUNCTION>exp</FUNCTION>
174			<FUNCTION>log</FUNCTION>
175			<FUNCTION>sqrt</FUNCTION>
176			
177			<!-- Keywords that should be operators -->
178			<KEYWORD2>is</KEYWORD2>
179			<KEYWORD2>rem</KEYWORD2>
180			<KEYWORD2>mod</KEYWORD2>
181			
182			<!-- Singleton variable -->
183			<KEYWORD3>_</KEYWORD3>
184			
185		</KEYWORDS>
186		
187	</RULES>
188
189	<RULES SET="LIST" DEFAULT="LITERAL2">
190		<SPAN TYPE="LITERAL2" NO_LINE_BREAK="TRUE" DELEGATE="LIST">
191			<BEGIN>[</BEGIN>
192			<END>]</END>
193		</SPAN>
194	</RULES>
195</MODE>