forked from GrammaTech/sel
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtokenizer.texi
39 lines (26 loc) · 1.22 KB
/
tokenizer.texi
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
The Clang C Tokenizer component offers the ability to construct a sequence of
tokens that represent a software object.
@subsection API Support
The @refapigeneric{sel/cp/clang-tokens:clang-tokens} method takes a @refapiclass{sel:software} object and an
optional list of roots indicating the elements that should be
tokenized. It returns a list of symbols representing all the tokens
under each of the roots.
The Clang C tokenizer uses the following conventions:
@multitable {} {}
@headitem Token Kind @tab Represented By
@item identifier
@tab interned string ``identifier''.
@item special character @* @w{(operator, parenthesis, brace, etc) }
@tab the interned string of the special character, e.g., @code{(intern "+")}.
@item primitive type
@tab the interned string for that type, e.g., @code{(intern "int")}.
@item keyword
@tab the interned string for that keyword, e.g., @code{(intern "if")}.
@item macros
@tab the interned string ``macro'' (macros are generally not expanded in the AST).
@item literals
@tab character, float, imaginary, integer, and string literals
are represented by the following interned strings, respectively:
``char-literal'', ``float-literal'', ``i-literal'', ``int-literal'',
``string-literal''.
@end multitable