Skip to content
RKCC-Red-King-TechnologyPublic

About

This is a project, for a Compiler Collection Framework and a Code Editor specifically for Java, C/Cpp and Python Projects. It gives you a build environment for creating and customizing codes and repositories.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

189 Commits

Folders and files

Repository files navigation

RKCC

This is a project, for a Compiler Collection Framework and a Code Editor specifically for Java, C/Cpp and Python Projects. It gives you a build environment for creating and customizing codes and repositories.

Repository Modules

Module Location Purpose Status
JavaCompiler modules/javacompiler/ Modular Java-to-x86-64 NASM compiler pipeline (byte, short, char, int, long, float, double) Integrated & verified (184 tests; Windows & Linux NASM/GCC CI)
RKCC Studio modules/studio/ Desktop IDE workspace application Existing module preserved untouched
Boolean Prototype modules/boolean/ Standalone boolean type module prototype Existing module preserved untouched
Legacy Swing Editor src/java/editor/ Early desktop editor entry point Existing code preserved untouched

modules/javacompiler — Integrated Java-to-x86-64 Compiler

  • Source Provenance: Incrementally updated with full preserved Git history via git subtree pull --prefix=modules/javacompiler from Krishna2132/JavaCompiler (Integration PR #4 -> Floating-Point PR #5, verified main commit abf2487).
  • Compiler Architecture: Java Source -> Lexer -> ListTokenStream -> Parser (TypeRegistry / IntegralTypeParser / FloatingPointTypeParser) -> AstSemanticAdapter -> SemanticAnalyzer (TypedAst) -> X86AssemblyGenerator -> Linux x86-64 NASM ELF64 (sys_write/ld for integer-only; SSE/SSE2 + libc/libm for float/double).
  • Supported Language Subset: byte, short, char (unsigned 16-bit), int, long, IEEE 754 float (binary32), and double (binary64); declarations, assignments, unary +/-/~, explicit primitive numeric casts (byte)..(double), decimal/scientific/hex floating literals (0x1.0p3), binary +, -, *, /, %, integral bitwise/shifts (SEM003 on float/double), MIN_VALUE / -1 overflow guards, JLS 5.1.3 NaN/Inf cast saturation, and runtime __div_zero traps.
  • Team Contributions:
    • Krishna: Compiler core contracts (AbstractTypeParser, TypeRegistry), lexer (including hex floats), token stream, diagnostics, NumericType/FloatingPointType system, FloatingPointTypeParser, explicit casts, SSE/SSE2 backend (XmmRegisterAllocator, FloatingPointInstructionGenerator), CompilerPipeline, CompilerStageJsonExporter, CompilerCli, native toolchain/execution framework, and differential/randomized test harnesses.
    • Jatin: Parser and concrete AST nodes (rkcc.compiler.parser, rkcc.compiler.ast).
    • Janesh: Integer type system (IntegerType, promotions, range validation) and SemanticAnalyzer / SymbolTable (rkcc.compiler.types, rkcc.compiler.semantic).
    • Riya: Linux x86-64 NASM assembly generator (rkcc.compiler.codegen).
    • Pending Integrations: Ayush's String type module and unifying modules/boolean/ (Ankit) into TypeRegistry remain future PRs.

Build, Test & CLI Instructions

# Build and run all 184 unit, differential, and randomized JVM tests (Windows or Linux)
mvn -B -f modules/javacompiler/pom.xml clean verify

# Run strict native ELF64 assembly + GNU ld / gcc -lm + native execution verification (Linux / WSL w/ nasm + binutils + gcc)
mvn -B -f modules/javacompiler/pom.xml clean verify -Drkcc.native.required=true

# Inspect compiler pipeline stages & generate x86-64 NASM assembly
java -cp modules/javacompiler/target/classes rkcc.compiler.integration.CompilerCli --input modules/javacompiler/examples/01_basic_arithmetic.java --tokens --ast --semantic --verbose
java -cp modules/javacompiler/target/classes rkcc.compiler.integration.CompilerCli --input modules/javacompiler/examples/07_basic_float_double.java --semantic

# Export structured JSON stage outputs (ready for future RKCC Studio / Neovim tooling integration)
java -cp modules/javacompiler/target/classes rkcc.compiler.integration.CompilerCli --input modules/javacompiler/examples/10_ieee754_special_values.java --json

Current Limitations & Future Roadmap

  • Native Linux ELF64 assembly/linking/execution requires nasm, GNU ld (binutils), and gcc (libm for floating-point fmod/fmodf/printf); on Windows hosts without WSL/NASM/GCC, the 11 native execution tests skip cleanly via NativeTestPreconditions.
  • Unsupported features: String, boolean pipeline integration, arrays, control flow (if/while/for), methods, classes, MLIR/LLVM backends, and direct Neovim/RKCC Studio UI wiring (planned future milestones).

About

This is a project, for a Compiler Collection Framework and a Code Editor specifically for Java, C/Cpp and Python Projects. It gives you a build environment for creating and customizing codes and repositories.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages