CookCC

CookCC - a Lexer / Parser (LALR(1)) Project

License

License

GroupId

GroupId

org.yuanheng.cookcc
ArtifactId

ArtifactId

cookcc
Last Version

Last Version

0.4.3
Release Date

Release Date

Type

Type

jar
Description

Description

CookCC
CookCC - a Lexer / Parser (LALR(1)) Project
Project URL

Project URL

http://coconut2015.github.io/cookcc/
Source Code Management

Source Code Management

https://github.com/coconut2015/cookcc

Download cookcc

How to add to project

<!-- https://jarcasting.com/artifacts/org.yuanheng.cookcc/cookcc/ -->
<dependency>
    <groupId>org.yuanheng.cookcc</groupId>
    <artifactId>cookcc</artifactId>
    <version>0.4.3</version>
</dependency>
// https://jarcasting.com/artifacts/org.yuanheng.cookcc/cookcc/
implementation 'org.yuanheng.cookcc:cookcc:0.4.3'
// https://jarcasting.com/artifacts/org.yuanheng.cookcc/cookcc/
implementation ("org.yuanheng.cookcc:cookcc:0.4.3")
'org.yuanheng.cookcc:cookcc:jar:0.4.3'
<dependency org="org.yuanheng.cookcc" name="cookcc" rev="0.4.3">
  <artifact name="cookcc" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.yuanheng.cookcc', module='cookcc', version='0.4.3')
)
libraryDependencies += "org.yuanheng.cookcc" % "cookcc" % "0.4.3"
[org.yuanheng.cookcc/cookcc "0.4.3"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

CookCC is a lexer and parser (LALR (1)) generator project, combined. It is written in Java, but the target languages can vary.

CookCC comes with two unique features, which were the original motivations for this work.

  1. CookCC uses a unique approach of storing and loading DFA tables in Java that significantly reduces the starting up time. Many efforts have been made to maximize the generated Java lexer and parser performances, painstakingly line-by-line, case-by-case fine turning the lexer and parser code. I believe that CookCC is the fastest lexer for Java ( see the performance test ).
  2. CookCC allows lexer/parser patterns and rules to be specified using Java annotation. This feature greatly simplifies and eases the writing of lexer and parser for Java.

Other Features

  • CookCC can produce highly compressed DFA tables for both the lexer and parser, using the similar compression algorithm found in flex.
  • For the lexer, DFA states constructed were minimal. (In contrast, Flex does not construct minimal DFA states).

CookCC requires JRE 1.7+ to run, but the generated Java code can be compiled and run with earlier versions of Java. There are zero dependencies for the generated Java code. So it is light and fast.

The current release is 0.4.2.

This software is licensed under APL 2.0. This license only applies to CookCC itself. The code generated belongs to you.

Versions

Version
0.4.3
0.4.2
0.4.1
0.4.0
0.3.3