/
Lexer Sample.aml
77 lines (72 loc) · 3.55 KB
/
Lexer Sample.aml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
<?xml version="1.0" encoding="utf-8"?>
<topic id="2a67db05-d02e-4972-9c0d-857f437846bb" revisionNumber="1">
<developerSampleDocument xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5" xmlns:xlink="http://www.w3.org/1999/xlink">
<!--
<summary>
<para>Optional summary abstract</para>
</summary>
-->
<introduction>
<!-- Uncomment this to generate an outline of the section and sub-section
titles. Specify a numeric value as the inner text to limit it to
a specific number of sub-topics when creating the outline. Specify
zero (0) to limit it to top-level sections only. -->
<!-- <autoOutline /> -->
<para>NppSharp now supports the creation of lexers using a .NET language.</para>
<para>Lexers provide syntax hilighting and code folding.</para>
</introduction>
<!-- <procedure>Optional procedures. See How To document for procedure layout example.</procedure> -->
<!-- <requirements>Optional requirements section</requirements> -->
<!-- <demonstrates>Optional info about what is demonstrated</demonstrates> -->
<!-- <codeExample>Optional code example</codeExample> -->
<!-- Add one or more top-level section elements. These are collapsible.
If using <autoOutline />, add an address attribute to identify it
and specify a title so that it can be jumped to with a hyperlink. -->
<section address="Section1">
<title>Optional section title</title>
<content>
<!-- Uncomment this to create a sub-section outline
<autoOutline /> -->
<para>
The following sample demonstrates a quick-and-dirty C lexer, written using NppSharp.
It supports syntax highlighting and code folding.
</para>
<codeReference>SampleLexer#C</codeReference>
<para>
The keywords are hard-coded in this lexer. For a full-on production
quality lexer, you may choose to use a configuration file to store
the keyword lists. This can be safely done in the class constructor
or the Styles 'get' property.
</para>
</content>
</section>
<relatedTopics>
<!-- One or more of the following:
- A local link
- An external link
- A code entity reference
<link xlink:href="Other Topic's ID">Link text</link>
<externalLink>
<linkText>Link text</linkText>
<linkAlternateText>Optional alternate link text</linkAlternateText>
<linkUri>URI</linkUri>
</externalLink>
<codeEntityReference>API member ID</codeEntityReference>
Examples:
<link xlink:href="00e97994-e9e6-46e0-b420-5be86b2f8278">Some other topic</link>
<externalLink>
<linkText>SHFB on CodePlex</linkText>
<linkAlternateText>Go to CodePlex</linkAlternateText>
<linkUri>http://shfb.codeplex.com</linkUri>
</externalLink>
<codeEntityReference>T:TestDoc.TestClass</codeEntityReference>
<codeEntityReference>P:TestDoc.TestClass.SomeProperty</codeEntityReference>
<codeEntityReference>M:TestDoc.TestClass.#ctor</codeEntityReference>
<codeEntityReference>M:TestDoc.TestClass.#ctor(System.String,System.Int32)</codeEntityReference>
<codeEntityReference>M:TestDoc.TestClass.ToString</codeEntityReference>
<codeEntityReference>M:TestDoc.TestClass.FirstMethod</codeEntityReference>
<codeEntityReference>M:TestDoc.TestClass.SecondMethod(System.Int32,System.String)</codeEntityReference>
-->
</relatedTopics>
</developerSampleDocument>
</topic>