This paper presents the design and implementation of Matlab to Modelica translator. The Lexical and Syntax analysis is done with the help of the OMCCp (OpenModelica Compiler Compiler parser generator) tool which generates the Matlab AST; which is later used by the translator for generating readable and reusable Modelica code.
Keywords: Modelica; MetaModelica; Matlab; OMCCp; translation
Proceedings of the 10th International Modelica Conference; March 10-12; 2014; Lund; Sweden
 Edgar Alonso Lopez-Rojas. OMCCp: A Meta-Modelica based parser generator applied to Modelica. Master’s-Thesis, Link√∂ping University, Department of Computer and Information Science, PELAB- Programming Environment Laboratory, ISRN:LIU-IDA/LITH-EX-A--11/019--SE, May 2011.
 Arunkumar Palanisamy. Extended MetaModelica based Integrated Compiler generator. Master’s-Thesis, Link√∂ping University, Department of Computer and Information Science, PELABProgramming Environment Laboratory, ISRN:LIU-IDA/LITH-EX-A--12/058--SE, October 2012.
 Peter Fritzson. Principles of Object-oriented modeling and simulation with Modelica 2.1. Wiley-IEEE Press, 2004.
 Peter Fritzson, Adrian Pop and Martin Sj√∂lund. Towards Modelica4 Meta-Programming and Language Modeling with MetaModelica 2.0, Technical reports Computer and Information Science Link√∂ping University Electronic Press, ISSN:1654-7233; 2011:10
 Peter Fritzson and Adrian Pop. Meta- Programming and Language Modeling with MetaModelica 1.0. Technical reports Computer and Information Science Link√∂ping University Electronic Press, ISSN: 1654-7233. 2011:9.
 Alfred Aho, Monica Lam, Ravi Sethi, Jeffrey Ullman. Compilers Principles, Techniques, and Tools, Second Edition. Addison-Wesley, 2006.
 Peter Fritzson et al. Compiler Construction laboratory assignments. Compendium, Bokakademin, Link√∂ping University, Department of Computer and Information Science, 2011.
 Michael Burke and G.A. Fisher Jr. A practical method for syntactic diagnosis and recovery. In Proceedings of the 1982 SIGPLAN symposium on Compiler Construction, 1982.
 Open Source Modelica Consortium. OpenModelica System Documentation Version 1.6, November 2010. http://www.openmodelica.org
 TheMathWorks,Inc.MATLAB http://www.mathworks.se/
 Luiz De Rose and David Padua. Techniques for the Translation of MATLAB Programs into Fortran 90, ACM Transactions on Programming Languages and Systems, Vol 21, March 1999.
 Luiz De Rose and David Padua. A MATLAB to Fortran 90 Translator and its Effectiveness. ISBN:0-89791-803-7, 1996.
 Pramod G. Joisha, Abhay Kanhere, Prithviraj Banerjee, U. Nagaraj Shenoy, Alok Choudhary. The Design and Implementation of a Parser and Scanner for the MATLAB Language in the MATCH Compiler, 1999.
 Pramod G. Joisha, U. Nagaraj Shenoy, Prithviraj Banerjee. An Approach to Array Shape Determination in MATLAB. Technical report no. CPDC‚Äď TR‚Äď2000‚Äď10‚Äď010, Oct 2010.
 Anton Dubrau and Laurie Hendren. Taming Matlab, Sable Technical Report No. sable-2011-04. McGill University, School of Computer Science, April, 2011.
 Jun Li. MCFOR: A MATLAB TO FORTRAN 95 COMPILER. McGill University, School of Computer Science, August, 2009.