lalr1

An LALR(1) parser generator.

https://github.com/t-weber/lalr1

Science Score: 67.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 8 DOI reference(s) in README
  • Academic publication links
    Links to: zenodo.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (6.0%) to scientific vocabulary

Keywords

compiler-design parser-generator
Last synced: 6 months ago · JSON representation ·

Repository

An LALR(1) parser generator.

Basic Info
  • Host: GitHub
  • Owner: t-weber
  • License: eupl-1.2
  • Language: C++
  • Default Branch: main
  • Homepage:
  • Size: 684 KB
Statistics
  • Stars: 0
  • Watchers: 2
  • Forks: 1
  • Open Issues: 1
  • Releases: 26
Topics
compiler-design parser-generator
Created over 3 years ago · Last pushed about 1 year ago
Metadata Files
Readme License Citation Authors

README.md

lalr1

DOI: 10.5281/zenodo.6987396

LALR(1) parser generator library in C++20. Generates either a recursive ascent parser or LALR(1) tables out of a given grammar. Supports parser generation for multiple target languages.

Forked on 30 July 2022 from https://github.com/t-weber/lr1 DOI: 10.5281/zenodo.3965097.

Installation

  • Create the build directory: mkdir build && pushd build.
  • Build the libraries: cmake -DCMAKE_BUILD_TYPE=Release .. && make -j$(($(nproc)/2+1)).
  • Install the libraries: make install.

Examples

Script Compiler

  • After building the libraries (see "Installation" above), run ./script_parsergen from the build directory to create the script compiler's parser component.
  • Re-run cmake -DCMAKE_BUILD_TYPE=Release .. && make -j$(($(nproc)/2+1)) to build the script compiler.
  • Run an example script using ./script_compiler -r ../examples/script_tests/fac.scr.

Expression Parser

  • After building the libraries (see "Installation" above), run ./expr_parsergen from the build directory to create the expression parser.
  • A graph of the LALR(1) closures is written to the file "expr.svg".
  • Re-run cmake -DCMAKE_BUILD_TYPE=Release .. && make -j$(($(nproc)/2+1)) to build the expression parser.
  • Run the expression parser using ./expr_compiler.

Symbolic Differentiation

  • After building the libraries (see "Installation" above), run ./diff_parsergen from the build directory to create the differentiation parser.
  • Re-run cmake -DCMAKE_BUILD_TYPE=Release .. && make -j$(($(nproc)/2+1)) to build the parser.
  • Run the parser using ./diff_compiler.

Owner

  • Name: Tobias Weber
  • Login: t-weber
  • Kind: user
  • Location: Seyssinet-Pariset, FR
  • Company: https://code.ill.fr/tweber

This is my personal GitHub account. My work mirror account can be found here: @tweber-ill.

Citation (CITATION.cff)

#
# citation file
# @see: https://github.com/citation-file-format/citation-file-format/blob/main/schema-guide.md
#

cff-version: 1.2.0
type: software
title: lalr1
message: An LALR(1) parser generator.
authors:
  - family-names: Weber
    given-names: Tobias
    email: tobias.weber@tum.de
    orcid: "https://orcid.org/0000-0002-7230-1932"
license: EUPL-1.2
repository-code: "https://github.com/t-weber/lalr1"

GitHub Events

Total
  • Push event: 2
Last Year
  • Push event: 2