String cheminEcriture = args[2] ;
String charset = args[3] ;
try {
/* Analyze the given file */
System.out.printf("~~ Analyzer DokuWiki ~~\n") ;
SyntaxAnalyzer a = new SyntaxAnalyzer(
new LexicalAnalyzer(new InputStreamReader(
new FileInputStream(cheminFichier), charset))) ;
System.out.printf("Analyzing file '%s'.\n", cheminFichier) ;
Symbol result = a.parse() ;
Document d = (Document) result.value ;
/* Write the analyse's result into a file */
System.out.print("Saving result ....\n") ;
IODocument.writeToFile(d, cheminEcriture);