Skip to content

BrunoScaglione/Language-Parser-GCode

Repository files navigation

Parser for G Code

This project is part of the Embarked Systems Course from the department of Mechatronics of the University of São Paulo (USP). It is a G code parser built with ANTLR in Python. The main goals of the project were to learn to build a language parser and test it.

Features

  • ANTLR — is a powerful parser generator for reading, processing, executing, or translating structured text or binary files
  • unittest — unit testing framework

Requirements

  • Java 1.7 or higher;
  • ANTLR installed and set up.

To install and setup (and get a better understanding of ANTLR if you want) ANTLR refer to this guide, which is a complete guide on ANTLR.

Getting started

  1. To parse the "testeG.txt" file into "output.txt" file:
python main.py testeG.txt
  1. To test the parser:
python -m unittest testcode2Parser.py

Project Details

You can check my report (in Portuguese) for more details on the project.

About

A Parser for G code built with ANTLR in Python

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors