Newsletter
Join the Community
Subscribe to our newsletter for the latest news and updates
Prototype of the Nlang Scripting Language with Intellisense Code Editor
Nlang is an open-source prototype of a scripting language bundled with an intellisense code editor, built on Next.js and ANTLR4, that lets developers experiment with a custom grammar and get real-time error checking in the browser.
Nlang is a prototype scripting language project that pairs a custom language grammar with a web-based code editor. It takes a grammar file (nlang/lang/nlang.g4) written for ANTLR4 and generates a TypeScript parser, which powers autocomplete and real-time error checking in the editor. The project runs as a Next.js application, with Chakra UI components for the interface, and is distributed under the MIT License on GitHub.
antlr4 -Dlanguage=TypeScript.yarn build / yarn start production workflow.yarn test runs integration tests and yarn quality-check enforces code standards; there are additional scripts in package.json.yarn dev.yarn and yarn dev, and open the local server to type in the custom language with live feedback.nlang/lang/nlang.g4, recompile with ANTLR4, and change the language's syntax, keywords, or rule structure.yarn build followed by yarn start to serve the editor as a static/SSR Next.js app.yarn test and yarn quality-check to keep the codebase healthy while you add new language features.The project has two development flows. For the application, you clone the repository, install dependencies with Yarn, and start the dev server with yarn dev. For the language, you create a Python virtual environment, install antlr4-tools via pip, edit the grammar file, and compile it to TypeScript using antlr4 -Dlanguage=TypeScript ./nlang/lang/nlang.g4. The generated TypeScript files are then used by the editor for parsing and validation.
@ts-ignore comments because they fail TypeScript checks; running the website requires Node.js 18+ and Yarn Classic.Nlang is a prototype scripting language that comes with an intellisense code editor. It uses ANTLR4 to generate a TypeScript parser from a grammar file, and the editor provides autocomplete and real-time error checking. The project is open source under the MIT License.
Clone the repository, ensure you have Node.js 18+ and Yarn Classic installed, then run yarn to install dependencies and yarn dev to start the development server. For production, use yarn build and yarn start.
The website requires Node.js 18+ and Yarn Classic. If you want to modify and recompile the grammar, you also need Python 3.11+ (recommended) and ANTLR4 Tools.
Yes. The grammar lives in nlang/lang/nlang.g4. You can edit it in ANTLR Lab, then compile it to TypeScript with antlr4 -Dlanguage=TypeScript ./nlang/lang/nlang.g4 inside a Python virtual environment with antlr4-tools installed.
Nlang is licensed under the MIT License, which permits free use, modification, and redistribution with attribution.
