LTGen provides classic algorithms used in Language Theory.

Related tags

MiscellaneousLTGen
Overview

LTGen

LTGen stands for Language Theory GENerator and provides tools to implement language theory.

Command Line

LTGen is a collection of tools to implement basic algorithms used in Language Theory. The command line arguments are mostly the same for the provided tools:

$ ltgen.py GRAMMAR OPTIONS

Where GRAMMAR is path to a file containing the grammar to work with (format is detailed below).

OPTIONS are detailed in the following sections but some (provided below) are shared by all tools:

  • --k -- select the lookup depth used in the tools.
  • --table -- output the analysis table (if any).
  • --gen-csv -- output the analysis table in CSV (if any).
  • --output|-o PATH? -- output to the analysis table to a file (with the given PATH or to path derived from the grammar file).
  • --word|-w "WORD" -- scan the WORD with the current analysis (separate non-terminals in the word by spaces).
  • --print -- print the current grammar (useful un conjunction with --word).

If no options is given, the used grammar is just displayed.

LL(k) Analysis

LTgen provides basics for LL(k) analysis:

  • --first -- computes first_k(X) for all or for listed non-terminals,
  • --follow -- computes follow_(k) for all or for listed non-terminals,
  • --lookahead -- computes k-lookahead(X -> s) for all or for listed nion-terminal productions.
  • --ll -- Test if the given grammar is LL(k).

.gram Files

Grammar can be expressed using .gramfiles. The format is very simple:

  • Rules are organized by lines.
  • A rule has the format: NAME -> SYM1 SYM2 ...
  • A symbol or a rule name can be any sequence of character that do contain spaces or tabulations.
  • The name of the first rule is the axiom of the grammar.
  • Empty lines are accepted.
  • Comments spans from the # to the end of the line.
  • Notice that the symbol $ is reserved to mark the end of word.

Example of grammar:

S'	->	S
S	->	a S b
S	->	R
R	->	b
R	->	c R

Testing

Unit is performed using pytest with the command:

$ pytest test.py
Owner
Hugues Cassé
Professor-assistant in University of Toulouse, France.
Hugues Cassé
This is the DBMS Project done in 5th sem of B.E CS.

Student-Result-Management-System This is the DBMS Project done in 5th sem of B.E CS. You need to install SQlite DB Browser in your pc or laptop to ope

Vivek kulkarni 1 Jan 14, 2022
Prometheus exporter for Spigot accounts

SpigotExporter Prometheus exporter for Spigot accounts What it provides SpigotExporter will output metrics for each of your plugins and a cumulative d

Jacob Bashista 5 Dec 20, 2021
Automatically remove user join messages when the user leaves the server.

CleanLeave Automatically remove user join messages when the user leaves the server. Installation You will need to install poetry to run this bot local

11 Sep 19, 2022
Import Apex legends mprt files exported from Legion

Apex-mprt-importer-for-Blender Import Apex legends mprt files exported from Legion. REQUIRES CAST IMPORTER Usage: Use a VPK extracter to extract the m

15 Dec 18, 2022
To check my COVID-19 vaccine appointment, I wrote an infinite loop that sends me a Whatsapp message hourly using Twilio and Selenium. It works on my Raspberry Pi computer.

COVID-19_vaccine_appointment To check my COVID-19 vaccine appointment, I wrote an infinite loop that sends me a Whatsapp message hourly using Twilio a

Ayyuce Demirbas 24 Dec 17, 2022
High-level bindings to the Valhalla framework.

Valhalla for Python This spin-off project simply offers improved Python bindings to the fantastic Valhalla project. Installation pip install valhalla

GIS • OPS 20 Dec 13, 2022
A simple program which gets a file(CSV/Excel) with tasks and creates different variants

TestMakerProject A simple program which gets a file(CSV/Excel) with tasks and creates different variants The main program is QTengine.py You only have

George 3 Nov 18, 2021
Aggressor script that gets the latest commands from CobaltStrikes web site and creates an aggressor script based on tool options.

opsec-aggressor Aggressor script that gets the latest commands from CobaltStrikes opsec page and creates an aggressor script based on tool options. Gr

JP 10 Nov 26, 2022
Create rangebased on lists or values of the range itself. Range any type. Can you imagine?

funcao-allrange-for-python3 Create rangebased on lists or values of the range itself. Range any type. Can you imagine? WARNING!!! THIS MODULE DID NOT

farioso-fernando 1 Feb 09, 2022
This repository contains the exercices for the robotics class at Supaero, 2022.

Supaero robotics, 2022 This repository contains the exercices for the robotics class at Supaero, 2022. The exercices are organized by notebook. Each n

Gepetto team, LAAS-CNRS 5 Aug 01, 2022
monster hunter world randomizer project

mhw_randomizer monster hunter world randomizer project Settings are in rando_config.py Current script for attack randomization is n mytest.py There ar

2 Jan 24, 2022
A small Python library which gives you the IEEE-754 representation of a floating point number.

ieee754 ieee754 is small Python library which gives you the IEEE-754 representation of a floating point number. You can specify a precision given in t

Bora Canbula 5 Dec 20, 2022
A class to draw curves expressed as L-System production rules

A class to draw curves expressed as L-System production rules

Juna Salviati 6 Sep 09, 2022
Think DSP: Digital Signal Processing in Python, by Allen B. Downey.

ThinkDSP LaTeX source and Python code for Think DSP: Digital Signal Processing in Python, by Allen B. Downey. The premise of this book (and the other

Allen Downey 3.2k Jan 08, 2023
Animation retargeting tool for Autodesk Maya. Retargets mocap to a custom rig with a few clicks.

Animation Retargeting Tool for Maya A tool for transferring animation data between rigs or transfer raw mocap from a skeleton to a custom rig. (The sc

Joaen 62 Dec 19, 2022
System Design Assignments as part of Arpit's System Design Masterclass

System Design Assignments The repository contains a set of problem statements around Software Architecture and System Design as conducted by Arpit's S

Relog 1.1k Jan 09, 2023
A webapp for taking fast notes, designed for business, school, and collaboration with groups.

JOTS Journal of the Session A webapp for taking fast notes, designed for business, school, and collaboration with groups.

Zebadiah S. Taylor 2 Jun 10, 2022
Reference management solution using Python and Notion.

notion-scholar Reference management solution using Python and Notion. The main idea of this app is to allow to furnish a Notion database using a BibTe

Thomas Hirtz 69 Dec 21, 2022
Iris-client - Python client for DFIR-IRIS

Python client dfir_iris_client offers a Python interface to communicate with IRI

DFIR-IRIS 11 Dec 22, 2022
Distributed behavioral experiments

Autopilot Docs Paper Forum Hardware Autopilot is a Python framework for performing complex, hardware-intensive behavioral experiments with swarms of n

70 Dec 14, 2022