<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://ascend4.org/index.php?action=history&amp;feed=atom&amp;title=ANTLR_exercise</id>
	<title>ANTLR exercise - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://ascend4.org/index.php?action=history&amp;feed=atom&amp;title=ANTLR_exercise"/>
	<link rel="alternate" type="text/html" href="https://ascend4.org/index.php?title=ANTLR_exercise&amp;action=history"/>
	<updated>2026-04-28T23:10:41Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.6</generator>
	<entry>
		<id>https://ascend4.org/index.php?title=ANTLR_exercise&amp;diff=158&amp;oldid=prev</id>
		<title>UploadBot: Restored page from Google Cache, uploaded by John Pye</title>
		<link rel="alternate" type="text/html" href="https://ascend4.org/index.php?title=ANTLR_exercise&amp;diff=158&amp;oldid=prev"/>
		<updated>2010-05-13T14:00:04Z</updated>

		<summary type="html">&lt;p&gt;Restored page from Google Cache, uploaded by John Pye&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;ANTLR is a candidate for replacing yacc/lex as the parser in ascend. This is needed for many reasons, of which a key one is generating C-code versions of models that are thread safe so we don&amp;#039;t have to clean up the current model interpreter. There are several other very good reasons for ANTLR:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* We want to do source-to-source translation of ascend models to other languages that give us optimization access (GAMS, AMPL, OSxL, Matlab).&lt;br /&gt;
* Similarly, we want to be able to dump a canned C or Fortran version of a model for standalone (non-ascend) use.&lt;br /&gt;
&lt;br /&gt;
The exercise is to demonstrate just the parsing with antlr of the current ascend language, with particular attention to the portions of the language defined in compiler/scanner.l (the lex/flex input file).&lt;br /&gt;
&lt;br /&gt;
The current parser/scanner are in compiler/ascParse.y and compiler/scanner.l.&lt;br /&gt;
&lt;br /&gt;
Notable differences between ascend and other languages are the NOTES feature of ascend and the fact that comments in ascend nest, unlike C/Java.&lt;br /&gt;
&lt;br /&gt;
Building ascend and installing Antlrworks is probably a good place to start.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 [[Category:GSOC2010]]&lt;/div&gt;</summary>
		<author><name>UploadBot</name></author>
	</entry>
</feed>