Skip to content

Albeforia/Pitaya

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

98 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

What's Pitaya

From Wikipedia:

A pitaya /pᵻˈtaɪ.ə/ or pitahaya /ˌpɪtəˈhaɪ.ə/ is the fruit of several cactus species indigenous to the Americas.

Pitaya is a generalized tool aimed at lexical analysis and syntax analysis.

It's the curriculum project for my course Compiler Principles.

Project spec

Pitaya mainly consists of three modules:

  1. General
  • This module contains components that can be reused by both lexical analyzer and syntax analyzer.
  1. LA
  • This module is responsible for lexical analysis.
  1. SA
  • This module is responsible for syntax analysis.

Below is the file structure of this project:

.
├── build
│   ├── General
│   ├── LA
│   ├── SA
│   └── Test
├── doc
│   └── html
├── external
│   └── boost_1_60_0
│       └── boost
├── grammar_spec
├── lib
└── source
    ├── General
    ├── LA
    ├── SA
    └── Test

Building

Pitaya has been developed with [Visual Studio 2015] (https://www.visualstudio.com/en-us/products/visual-studio-community-vs.aspx), the build folder contains the solution file and all project files respectively.

All three modules mentioned above will be built into static library. If the project was built correctly, lib folder should contain these files:

  • pitaya.lib
  • pitaya_la.lib
  • pitaya_sa.lib

Dependencies

external folder contains all the external library this project depends on.

Pitaya only uses boost 1.60.0 for now.

Note The sub-project Test produces an executable which uses boost's [program options] (http://www.boost.org/doc/libs/1_60_0/doc/html/program_options.html) thus needs the corresponding static library (libboost_program_options-vc140-mt-gd-1_60.lib for debug and libboost_program_options-vc140-mt-1_60.lib for release).

You should download boost 1.60.0 and run bootstrap.bat. Upon finishing, open your terminal and execute:

$ b2 --build-dir=[some directory] --build-type=complete msvc stage link=static

Go ahead to play Civ5, win, switch to the output folder, copy the .lib to lib folder, done.:wink:

Documentation

doc folder contains the documentation generated by Doxygen in the format of html.

Grammar spec

About

A generalized tool aimed at lexical analysis and syntax analysis.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages