Skip to content

Commit d3fa549

Browse files
authored
fix some typos in QNFA.html (#4402)
1 parent 2adc20b commit d3fa549

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

utilities/qxs/doc/QNFA.html

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -238,12 +238,12 @@ <h2><a class="anchor" name="exSyntax">
238238
<h3>Core concepts</h3>
239239
<p>
240240
There are two fundamental notions in QCE syntax files : contexts and "regular" matches.<p>
241-
The concept of context is extremely powerful while remaining extremely simple. The syntax engine enters a context when a given start token is matched and it leaves it when a stop token is matched. Within a context there can be any number of contexts and "regular" matches. contexts are typically used to match comments, strings or other special blocks of code.<p>
242-
"Regular" matches are what one would expect them to be : simple tokens. They can be matched from either regular expressions or plain strings. Start and stop tokens of context are "regular" matches in a way, except that they also trigger the context enter/leave event.<p>
241+
The concept of context is extremely powerful while remaining extremely simple. The syntax engine enters a context when a given start token is matched and it leaves it when a stop token is matched. Within a context there can be any number of contexts and "regular" matches. Contexts are typically used to match comments, strings or other special blocks of code.<p>
242+
"Regular" matches are what one would expect them to be : simple tokens. They can be matched from either regular expressions or plain strings. Start and stop tokens of a context are "regular" matches in a way, except that they also trigger the context enter/leave event.<p>
243243
<h3>Syntax file structure</h3>
244244
<p>
245245
Now, on to the analysis of the structure of a syntax file.<p>
246-
The root element of the document is a &lt;QNFA&gt; tag. It provides various informations in its attributes.<p>
246+
The root element of the document is a &lt;QNFA&gt; tag. It provides various information in its attributes.<p>
247247
<ul>
248248
<li>
249249
<b>language</b> : this attribute specifies the name of the language supported by the syntax file. </li>
@@ -256,22 +256,22 @@ <h3>Syntax file structure</h3>
256256
The QNFA tag represents the root context of the language. It can contain any number of the following tags :<p>
257257
<ul>
258258
<li>
259-
<b>context</b> : defines a context. To be valid, requires children tags of type <b>start</b> and <b>stop</b>.<p>
259+
<b>context</b> : defines a context. To be valid, requires child tags of type <b>start</b> and <b>stop</b>.<p>
260260
</li>
261261
<li>
262-
<b>sequence</b> : defines a "regular" match. The value of this element is always assumed to be a regexp (no internal optimizations attempt for plain strings).<p>
262+
<b>sequence</b> : defines a "regular" match. The value of this element is always assumed to be a regexp (no internal optimizations attempts for plain strings).<p>
263263
</li>
264264
<li>
265265
<b>word</b> : defines a "regular" match. The value of this element is checked to determine whether it can be matched as a plain string (internal optimizations). Additionally, this element will ONLY be matched at word boundaries. For instance, if the value of a word element is for, it will not be matched in "foreach" while it would have been, if declared using a <b>sequence</b> tag.<p>
266266
</li>
267267
<li>
268-
<b>list</b> : this is a "meta-element" used to group regular matches and give them the same attributes as they are propagated from the this element to its children. Subrouping (nesting <b>list</b> elements) is NOT supported.<p>
268+
<b>list</b> : this is a "meta-element" used to group regular matches and give them the same attributes as they are propagated from the this element to its children. Subgrouping (nesting <b>list</b> elements) is NOT supported.<p>
269269
</li>
270270
<li>
271-
<b>embed</b> : this is a "meta-element" which allows embedding of other languages or contexts to help reducing duplication of content and make maintenance of syntax files easier. The embedding target is specified through the <em>target</em> attribute. </li>
271+
<b>embed</b> : this is a "meta-element" which allows embedding of other languages or contexts to help reduce duplication of content and make maintenance of syntax files easier. The embedding target is specified through the <em>target</em> attribute. </li>
272272
</ul>
273273
<p>
274-
Additionally, the following tags are valid inside a <b>context</b> block (and, again, their number isn't limited). Also note that, while ordering of all tags above within a context DO matter, ordering of the tags below DO NOT matter.<p>
274+
Additionally, the following tags are valid inside a <b>context</b> block (and, again, their number isn't limited). Also note that, while ordering of all tags above within a context DOES matter, ordering of the tags below DOES NOT matter.<p>
275275
<ul>
276276
<li>
277277
<b>start</b> : defines a context start token as a "regular" match (remarks made about the <b>word</b> tag apply to this one as well).<p>
@@ -280,7 +280,7 @@ <h3>Syntax file structure</h3>
280280
<b>stop</b> : defines a context stop token as a "regular" match (remarks made about the <b>word</b> tag apply to this one as well).<p>
281281
</li>
282282
<li>
283-
<b>escape</b> : defines a special token as a "regular" match (remarks made about the <b>sequence</b> tag apply to this one as well). This element is used for the very common case of escape sequences which may prevent a stop token from being one. In most case it is however recommended to favor explicit escape match through a <b>sequence</b>, for instance in C-like strings the following construct is used : <div class="fragment"><pre class="fragment"> &lt;sequence <span class="keywordtype">id</span>=<span class="stringliteral">"escape"</span> format=<span class="stringliteral">"escapeseq"</span> &gt;\\[nrtvf\\<span class="stringliteral">"'\n\n]&lt;/sequence&gt; </span>
283+
<b>escape</b> : defines a special token as a "regular" match (remarks made about the <b>sequence</b> tag apply to this one as well). This element is used for the very common case of escape sequences which may prevent a stop token from being one. In most cases it is however recommended to favor explicit escape match through a <b>sequence</b>, for instance in C-like strings the following construct is used : <div class="fragment"><pre class="fragment"> &lt;sequence <span class="keywordtype">id</span>=<span class="stringliteral">"escape"</span> format=<span class="stringliteral">"escapeseq"</span> &gt;\\[nrtvf\\<span class="stringliteral">"'\n\n]&lt;/sequence&gt; </span>
284284
</pre></div> </li>
285285
</ul>
286286
<p>
@@ -290,7 +290,7 @@ <h3>Syntax file structure</h3>
290290
<b>format</b> : specifies the format to be applied to the matches (highlighting). This property is propagated.<p>
291291
</li>
292292
<li>
293-
<b>id</b> : assign an identifier to the element. This is only used for contexts at the moment however and the only "external" use of it occurs in the <b>embed</b> tag. </li>
293+
<b>id</b> : assigns an identifier to the element. This is only used for contexts at the moment however and the only "external" use of it occurs in the <b>embed</b> tag. </li>
294294
</ul>
295295
<p>
296296
Additionally all tags, except <b>context</b> and <b>list</b>, support the following extra attributes :<p>

0 commit comments

Comments
 (0)