1 Star 0 Fork 14

suyan / MapleFE

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
[Origin of MapleFE]

This project is to create a programming language frontend, which leverages 'Autogen' to complete
most of work of lexing and parsing. The origin of this project is coming from the history in our parst twenty
years of work in compiler and programming languages. We are tired of the tons of modifications of existing
opensource frontend project like Clang, if we want to do something in new language features. So we decided to
have our own frontend, which could be easier to handle new languages.

[Key points]

1. Autogen is the key idea which automatically generates lexing/parsing data structures in .h/.cpp files which
   are further included in the language frontend. The language implementors write .spec files describing the
   language specifications under the language directory, such as java/.
2. The parsing algorithm is named Wavefront. The rules are categorized into recursions, and recursions are
   combined into group if they reach each other. The Wavefront parsing is working on the recursion group.
   It works wave by wave until it reaches the fixed point.

[Source code directory]

1. Most programming languages have very similar syntax, so it's very helpful to put
   the shared part into a common directory. shared/ is for this usage. It contains
     a) shared data structures representing shared syntax;
     b) shared parser/translater components; 
2. Language specific parts are in their own directory, such as java/. It contains some special part of this
   language, the language .spec files, and gen_xxx.h/gen_xxx.cpp which are generted by autogen.
3. The tool autogen is under autogen/
4. The tool recdetect is under recdetec/. It's used to find the recursions and recursion groups.

[Preparation]

Before start building MapleFE, please download mapleall from the open ark compiler incubator,
https://gitee.com/openarkcompiler-incubator/mapleall
Follow the instruction of mapleall and build the necessary libraries.
Once you are done, please update the lib and include paths in MapleFE/shared/src/Makefile accordingly.

[How to build]

1. cd YOUR_PROJECT_DIR
2. make
3. If you are working at Java frontend, you will see build64/java/java2mpl. This is the executable
   frontend.

[How to test]

1. cd YOUR_PROJECT_DIR/test
2. ./runtests.pl all

You can find all Java test cases in YOUR_PROJECT_DIR/test/java2mpl. Right now only java test cases
are used.

空文件

简介

MapleFE is a unified frontend which is able to translate multiple languages into MapleIR. 展开 收起
C++
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
C++
1
https://gitee.com/suyan007/MapleFE.git
git@gitee.com:suyan007/MapleFE.git
suyan007
MapleFE
MapleFE
master

搜索帮助