comparison examples/hw/hw2.syn @ 0:13d2b8934445

Import AnaGram (near-)release tree into Mercurial.
author David A. Holland
date Sat, 22 Dec 2007 17:52:45 -0500
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:13d2b8934445
1 /*
2 AnaGram Programming Examples
3 HW2: Hello, World!
4 Traditional First Program
5 C++ Version
6
7 Copyright 1993 Parsifal Software. All Rights Reserved.
8
9 This software is provided 'as-is', without any express or implied
10 warranty. In no event will the authors be held liable for any damages
11 arising from the use of this software.
12
13 Permission is granted to anyone to use this software for any purpose,
14 including commercial applications, and to alter it and redistribute it
15 freely, subject to the following restrictions:
16
17 1. The origin of this software must not be misrepresented; you must not
18 claim that you wrote the original software. If you use this software
19 in a product, an acknowledgment in the product documentation would be
20 appreciated but is not required.
21 2. Altered source versions must be plainly marked as such, and must not be
22 misrepresented as being the original software.
23 3. This notice may not be removed or altered from any source distribution.
24 */
25
26 [ parser file name = "#.cpp" ] // Configuration section
27
28 grammar -> '\n' =cout << "Hello, world!\n";
29
30 { // Start of embedded C
31 #include <iostream>
32
33 int main(void) {
34 hw2(); // Call Parser
35 return 0;
36 }
37
38 } // End of embedded C