What's new? | Help | Directory | Sign in
Google
heron-language
Heron is an object-oriented programming language for model driven architecture
  
  
  
  
    
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
/*
Authour: Christopher Diggins
License: MIT Licence 1.0
*/

#define _CRT_SECURE_NO_DEPRECATE

//#define YARD_LOGGING

#include <string>
#include <iostream>

#include "yard/yard.hpp"
#include "yard/yard_io.hpp"

#include "jaction_grammar.hpp"
#include "heron_grammar.hpp"
#include "heron_misc.hpp"
#include "heron_parser.hpp"
#include "heron_unit_tests.hpp"
#include "xml/yard_xml_grammar.hpp"
#include "heron_to_java.hpp"

using namespace heron_grammar;

int main(int argn, char* argv[])
{
printf("Heron to Java Compiler version 0.2\n");
printf("written by Christopher Diggins\n");
printf("licensed under the MIT license 1.0\n");

if (argn != 3)
{
printf("Usage\n\n");
printf("heron <outputfolder> <inputfile>\n\n");
return 1;
}

printf("running %s\n", argv[0]);

RunUnitTests();

outputPath = argv[1];

char* input = ReadFile(argv[2]);
Node* tree = ParseString<Program>(input);

if (tree != NULL) {
OutputProgram(tree);
}
else {
getchar();
}

free(input);
fflush(stdout);
fclose(stdout);

//char buffer[255];
//sprintf(buffer, "javac %s", argv[1]);
//system(buffer);

return 0;
}




Show details Hide details

Change log

r43 by cdiggins on Mar 25, 2008   Diff
Improved C++ compliance of YARD library.
Started using unit tests again. Made a
bunch of improvements.
Go to: 
Project members, sign in to write a code review

Older revisions

r42 by cdiggins on Mar 24, 2008   Diff
Compiles and works. Renamed
"misc/io.hpp" to "yard/yard_io.hpp"
r27 by cdiggins on Feb 18, 2008   Diff
Getting closer all the time.
r26 by cdiggins on Feb 17, 2008   Diff
Slowly getting there.
All revisions of this file

File info

Size: 1191 bytes, 68 lines