forked from antlr/website-antlr4
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
304 lines (221 loc) · 13.1 KB
/
index.html
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
<!doctype html>
<!--[if lt IE 9]><html class="ie"><![endif]-->
<!--[if gte IE 9]><!--><html><!--<![endif]-->
<head>
<meta charset="utf-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>ANTLR</title>
<!--[if lt IE 9]><script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
<link rel="stylesheet" href="css/fontface/Droid-Sans/stylesheet.css" type="text/css" media="screen" />
<link rel="stylesheet" href="css/fontface/DejaVu-Sans-Mono/stylesheet.css" type="text/css" media="screen" />
<link rel="stylesheet" href="css/antlr.css" type="text/css" media="screen" />
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script src="scripts/selectivizr-min.js"></script>
<script src="scripts/cycle.js"></script>
<script src="scripts/rounded.js"></script>
<script src="scripts/watermark.js"></script>
<script type="text/javascript" src="scripts/lib/jquery.mousewheel-3.0.6.pack.js"></script>
<script type="text/javascript" src="scripts/source/jquery.fancybox.js?v=2.0.6"></script>
<link rel="stylesheet" type="text/css" href="scripts/source/jquery.fancybox.css?v=2.0.6" media="screen" />
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-1024344-1', 'auto');
ga('send', 'pageview');
</script>
<!-- Start of Woopra Code -->
<script>
(function(){
var t,i,e,n=window,o=document,a=arguments,s="script",r=["config","track","identify","visit","push","call","trackForm","trackClick"],c=function(){var t,i=this;for(i._e=[],t=0;r.length>t;t++)(function(t){i[t]=function(){return i._e.push([t].concat(Array.prototype.slice.call(arguments,0))),i}})(r[t])};for(n._w=n._w||{},t=0;a.length>t;t++)n._w[a[t]]=n[a[t]]=n[a[t]]||new c;i=o.createElement(s),i.async=1,i.src="//static.woopra.com/js/t/5.js",e=o.getElementsByTagName(s)[0],e.parentNode.insertBefore(i,e)
})("woopra");
woopra.config({
domain: 'antlr.org'
});
woopra.track();
</script>
<!-- End of Woopra Code -->
</head>
<body>
<header>
<a id="index" href="index.html">ANTLR</a>
<nav>
<script src="scripts/topnav.js"></script>
</nav>
</header>
<div id="wrapper">
<div id="home"><!--this div provides the light background section on the homepage-->
<div id="container">
<div id="main">
<div class="col3" id="whatis">
<h2>What is ANTLR?</h2>
<p><strong>ANTLR</strong> (ANother Tool for Language Recognition) is a
powerful parser generator for reading, processing, executing, or
translating structured text or binary files. It's widely used to build
languages, tools, and frameworks. From a grammar, ANTLR generates a
parser that can build and walk parse trees.</p>
<font size=3><p><i>Check out Terence's latest adventure <a href="http://explained.ai">explained.ai</a></i></p></font>
<div id="terence"><img src="images/terence.jpg" alt="terence" />
<strong>Terence Parr</strong> is the maniac behind ANTLR and has been
working on language tools since 1989. He is a professor of computer
science at the <a href="http://www.cs.usfca.edu/~parrt">University of San Francisco</a>.
</div>
</div><!--/col3-->
<div id="module">
<ul id="tabs">
<li id="tab-qs"><a href="javascript:void">Quick Start</a></li>
<li id="tab-sa"><a href="javascript:void">Samples</a></li>
</ul>
<h2 id="hd-sa">Samples</h2>
<h2 id="hd-qs">Quick Start
<br>
<font size=2>See <a href="https://github.com/antlr/antlr4/blob/master/doc/getting-started.md">Getting Started with ANTLR v4</a></font>
</h2>
<div class="screen" id="quickstart">
<div class="slide">
OS X
<pre>
<span class="dollar">$</span> <span class="cmd">cd</span> /usr/local/lib
<span class="dollar">$</span> <span class="cmd">sudo curl</span> -O https://www.antlr.org/download/antlr-4.9.2-complete.jar
<span class="dollar">$</span> <span class="cmd">export</span> <span class="equals">CLASSPATH=</span><span class="path">".:/usr/local/lib/antlr-4.9.2-complete.jar:$CLASSPATH"</span>
<span class="dollar">$</span> <span class="cmd">alias</span> <span class="equals">antlr4=</span><span class="path">'java -jar /usr/local/lib/antlr-4.9.2-complete.jar'</span>
<span class="dollar">$</span> <span class="cmd">alias</span> <span class="equals">grun=</span><span class="path">'java org.antlr.v4.gui.TestRig'</span>
</pre>
</div>
<div class="slide">
LINUX
<pre>
<span class="dollar">$</span> <span class="cmd">cd</span> /usr/local/lib
<span class="dollar">$</span> <span class="cmd">wget</span> https://www.antlr.org/download/antlr-4.9.2-complete.jar
<span class="dollar">$</span> <span class="cmd">export</span> <span class="equals">CLASSPATH=</span><span class="path">".:/usr/local/lib/antlr-4.9.2-complete.jar:$CLASSPATH"</span>
<span class="dollar">$</span> <span class="cmd">alias</span> <span class="equals">antlr4=</span><span class="path">'java -jar /usr/local/lib/antlr-4.9.2-complete.jar'</span>
<span class="dollar">$</span> <span class="cmd">alias</span> <span class="equals">grun=</span><span class="path">'java org.antlr.v4.gui.TestRig'</span>
</pre>
</div>
<div class="slide">
Windows
<ol>
<li>Download <a href="https://www.antlr.org/download/antlr-4.9.2-complete.jar">https://www.antlr.org/download/antlr-4.9.2-complete.jar</a>.
<li>Add antlr4-complete.jar to CLASSPATH, either:
<ul>
<li>Permanently: Using System Properties dialog > Environment variables > Create or append to CLASSPATH variable
<li>Temporarily, at command line:<br>
<pre>
SET CLASSPATH=.;C:\Javalib\antlr4-complete.jar;%CLASSPATH%
</pre>
</ul>
<li>Create batch commands for ANTLR Tool, TestRig in dir in PATH
<pre>
antlr4.bat: java org.antlr.v4.Tool %*
grun.bat: java org.antlr.v4.gui.TestRig %*
</pre>
</ol>
</div>
</div><!--/screen-->
<div class="screen" id="samples">
<div class="slide">
<pre class="pre3">
grammar Expr;
prog: (expr NEWLINE)* ;
expr: expr ('*'|'/') expr
| expr ('+'|'-') expr
| INT
| '(' expr ')'
;
NEWLINE : [\r\n]+ ;
INT : [0-9]+ ;
</pre>
<pre class="pre3">
$ antlr4 Expr.g4
$ javac Expr*.java
$ grun Expr prog -gui
100+2*34
^D
</pre>
<pre class="pre3">
<img src="images/sample3.png" alt="sample3" width="130"/>
</pre>
</div>
<div class="slide"><code>Linux</code></div>
<div class="slide"><code>Mac</code></div>
</div><!--/screen-->
<div id="pager-qs" class="pager"></div>
<div id="pager-sa" class="pager"></div>
</div><!--/module-->
</div><!--/main-->
<section><!--home only-->
<div class="col3" id="latest-news">
<h2>Latest News</h2>
<a class="twitter-timeline" href="https://twitter.com/the_antlr_guy" data-widget-id="373882077285871616">Tweets by @the_antlr_guy</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+"://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
<div class="dot-pager" id="pager-tw"></div>
</div><!--/col3-->
<div class="col3" id="testimonials">
<h2><a href="testimonials.html">Testimonials</a></h2>
<div id="tests">
<div class="testimonial">
Kudos. I'm actually really liking ANTLR! I have a pretty darn good
velocity with a rapid prototyping project I am doing in my Google 20%
time. For example, I just discovered a feature in rewrite rules that
does exactly what I need (referencing previous rule ASTs, p. 174 in
your book). It took me about 5 minutes to get this to work and remove
an ugly wart from my grammar. Hats off!
<strong>Guido van Rossum, Inventor of Python</strong>
</div>
<div class="testimonial">
ANTLR is an exceptionally powerful and flexible tool for parsing
formal languages. At Twitter, we use it exclusively for query parsing
in Twitter search. Our grammars are clean and concise, and the
generated code is efficient and stable. The <a href="http://pragprog.com/book/tpantlr2/the-definitive-antlr-4-reference">book</a> is our go-to
reference for ANTLR v4 -- engaging writing, clear descriptions and
practical examples all in one place.
<strong>Samuel Luckenbill, Senior Manager of Search Infrastructure, Twitter, inc.</strong>
</div>
<div class="testimonial">
Just wanted to take the opportunity to say thanks. ANTLR is a BIG
improvement over yacc/lex, and your support for it most
commendable. Managed to get my tired old brain around it in a
day. Nice work!
<strong>Brad Cox, Inventor of Objective-C</strong>
</div>
<a href="testimonials.html">More...</a>
<div class="testimonial">
</div>
</div><!--/tests-->
<div class="dot-pager" id="pager-te"></div>
</div><!--/col3-->
<div class="col3" id="resources">
<h2>Resources</h2>
<a href="http://pragprog.com/book/tpantlr2/the-definitive-antlr-4-reference"><img src="images/tpantlr2.jpg"
width=110></a>
<a href="http://pragprog.com/book/tpdsl/language-implementation-patterns"><img src="images/tpdsl.jpg"
width=110></a>
<br><br><a href="https://github.com/antlr/antlr4/blob/master/doc/getting-started.md">Getting started with ANTLR v4</a>
<br><br><a href="https://github.com/antlr/antlr4/blob/4.9.2/doc/index.md">ANTLR
Documentation</a>
<br><br><a href="/api">Runtime API Doc</a>
<br><br><a href="https://github.com/antlr/antlr4">Browse source tree (github)</a>
<br><br><a href="https://github.com/antlr/antlr4/blob/master/doc/faq/index.md">Frequently Asked Questions</a>
<br><br><a href="http://www.stringtemplate.org">StringTemplate template engine</a>
<br><br>
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-butcc-donate.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
<img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
<input type="hidden" name="encrypted" value="-----BEGIN PKCS7-----MIIHbwYJKoZIhvcNAQcEoIIHYDCCB1wCAQExggEwMIIBLAIBADCBlDCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20CAQAwDQYJKoZIhvcNAQEBBQAEgYCrdy1Koun23GuO10iTQ5FnjrxHt8uPsZNY5Jc1Yogpvnz7c97SQM/k9g5zznhrw8SML9f/8Wc7yRFmP/jz/NkElSScwdiQD8bGlwdEeUMKThjabBWtU7phvfnvZGM5ff4InbiKR23AEZtX0dNGFrKC3B6dEvskHBAtwB40MJ5bKDELMAkGBSsOAwIaBQAwgewGCSqGSIb3DQEHATAUBggqhkiG9w0DBwQIhomSdIN1k6GAgci82QqygQVmdBxTsl8YxUHI22VPzQCoEr4sZoJUxLrVZtD6Ay+ZR9XJTurNMcMRcQtWFl1i5chg+UbiE1R9JE7dpY3Gz99m4MG91YS1SWhc5wlEpdAi0JNX/cjhwL95NYP8eSsr0NPPMXnHzj9I9OWtVvcmsz+Qu//TvyG5O886jahbZj/NYqEG4Lp35Z/FjEc3e5LEwWXrau2oKEC2NO0hArEnCYBbnYKQV9gXhgSzSpOj45LCNcHZyC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qJ1tYVIT5DgWpE692Ag422H7yRIr/9j/iKG4Thia/Oflx4TdL+IFJBAyPK9v6zZNZtBgPBynXb048hsP16l2vi0k5Q2JKiPDsEfBhGI+HnxLXEaUWAcVfCsQFvd2A1sxRr67ip5y2wwBelUecP3AjJ+YcxggGaMIIBlgIBATCBlDCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20CAQAwCQYFKw4DAhoFAKBdMBgGCSqGSIb3DQEJAzELBgkqhkiG9w0BBwEwHAYJKoZIhvcNAQkFMQ8XDTA2MDUzMTIzMDczMVowIwYJKoZIhvcNAQkEMRYEFNoT3UpXGKrjOMcRV9navSOvBwAeMA0GCSqGSIb3DQEBAQUABIGAwNyn7ECfrJ8X5YZOrUK+2NfiOJWuw1BW3GH4jwMfUkeg/VsP75TTZBBJVilmheAtamY6KmbY1Zq1yiyJOuZOMCu2ooFt5y4KBy8ePxNRSnlQJANTFM7/2xHceXVxusm/W4mzFHtgDGoQ3mSGu2sPXwwQlBjRdcF8hyyLqDNR1hE=-----END PKCS7-----
">
</form>
</div><!--/col3-->
</section>
</div><!--/container-->
<div class="clear"><!--necessary nudge--></div>
</div><!--/home-->
</div><!--/wrapper-->
<footer>
<script src="scripts/bottomnav.js"></script>
</footer>
<script src="scripts/functions.js"></script>
</body>
</html>