RACSO
DFA
CFG
Operations:
Reg
,
CF
PDA
Reductions:
K
,
WP
,
CFG
,
NP
,
SAT
ANTLR:
lexical
,
syntactic
Exams
log in
,
register
,
become guest
This site uses cookies only for the purpose of identifying user sessions. This is required to properly register actions.
Exercises on ANTLR lexical descriptions
Lexical ANTLR description for strings over
{
a
,
b
,
c
}
\{a,b,c\}
{
a
,
b
,
c
}
in which the first occurrence of
b
b
b
is preceded by some
a
a
a
Lexical ANTLR description for floating point numbers as
3.1416
-3e4
+1.0e-5
2.
.567e+8
Lexical ANTLR description for all strings of lowercase letters where each of the five vowels occur exactly once, and the vowels appear in the usual order
Lexical ANTLR description for all strings of lowercase letters where the letters appear in strict lexicographic increasing order (
a
<
b
<
c
<
…
<
m
<
n
<
o
<
…
a<b<c<\ldots<m<n<o<\ldots
a
<
b
<
c
<
…
<
m
<
n
<
o
<
…
)
Lexical ANTLR description for financial quantities in American notation, like
$**2,345.67
$12,452,183.16
$****12
$*0.124300
Lexical ANTLR description for inexact constants in Scheme, like
35##
35#.##
356.3##
35.
35#.
0.#
Lexical ANTLR description for the identifiers of the C programming language
Lexical ANTLR description for the integer constants of the C programming language
Lexical ANTLR description for the real (floating point) constants of the C programming language
Lexical ANTLR description for the char constants of the C programming language
Lexical ANTLR description for the string constants of the C programming language
Lexical ANTLR description for the comments
/*...*/
of the C programming language