PageRenderTime 36ms CodeModel.GetById 30ms app.highlight 2ms RepoModel.GetById 2ms app.codeStats 1ms

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

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