Skip to content

Development of Java CUP - Construction of Useful Parsers

License

Notifications You must be signed in to change notification settings

EmptyDreams/cup

 
 

Repository files navigation

CUP Parser Generator (Community Fork)

An independent, community-maintained fork of the original CUP (Construction of Useful Parsers) parser generator for Java.

🚀 Key Improvements

  • Modern Gradle build system (replaces legacy Ant)
  • Automatic AST generation via the -ast flag (e.g., Node%s)
  • Extended BNF syntax and cleaner grammar support
  • Reduced legacy code: Removed XML output and other unused features
  • Integrated tests: Includes MiniJava and calculator examples with automated validation

🛠️ Build & Use

Prerequisites: JDK 11+, Gradle (or use wrapper)

# Generate parser and lexer sources
./gradlew generateCupParser generateJFlexLexer

# Build main and runtime JARs
./gradlew jar

# Output:
# - build/libs/java-cup-11b.jar          (main tool)
# - build/libs/java-cup-11b-runtime.jar  (runtime library for generated parsers)

About

Development of Java CUP - Construction of Useful Parsers

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Java 82.9%
  • HTML 14.0%
  • Lex 2.6%
  • Other 0.5%