Code Monkey home page Code Monkey logo

server-code-exciser's Introduction

🈹 Server Code Exciser



ci

An antl4r based program that can automatically remove server only code from Unreal projects using Angelscript (https://angelscript.hazelight.se/)

Thanks to Tom van Dijck for initiating this project and suggesting to use Antl4r as the base!

Setup

I would strongly recommend using VSCode as that will give you the visual antl4r debugger. You need these extensions:

  • ANTLR4 grammar syntax support
  • C#

Then, you should just have to open the Grammar/AngelscriptParser.g4 file and save it once to generate all the antl4r stuff.

Launch Settings

Since the launch targets include local paths, I don't think it makes sense to have these checked in in project scope, so I'll just put some launch config templates here instead! <3 You will have to put your own arguments in there of course :) These configs will excise a full script folder and visually debug one AS file, respectively!

{
	// Use IntelliSense to learn about possible attributes.
	// Hover to view descriptions of existing attributes.
	// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
	"version": "0.2.0",
	"configurations": [
		{
			"name": "Excise Server Angelscript",
			"type": "coreclr",
			"request": "launch",
			"preLaunchTask": "build",
			"program": "${workspaceFolder}/ServerCodeExciser/bin/Debug/net5.0/ServerCodeExciser.exe",
			"args": ["C:/Projects/MyProject/Script"],
			"cwd": "${workspaceFolder}/ServerCodeExciser",
			"console": "internalConsole",
			"stopAtEntry": false
		},
		{
			"name": "Debug Angelscript Grammar For Input",
			"type": "antlr-debug",
			"request": "launch",
			"preLaunchTask": "build",
			"grammar": "${workspaceFolder}/UnrealAngelscriptParser/Grammar/UnrealAngelscriptParser.g4",
			"input": "C:/Projects/MyProject/Script/Foo.as",
			"printParseTree": true,
			"visualParseTree": true
		}
	]
}

I usually try running the full parser target to see which files are breaking. Then I point the grammar target to that file and run it. After you see the errors, you can then start removing code from the file until only the thing that causes the error is left, and then start tweaking the grammar to fix it! Happy antlering!

Embark

Contribution

Contributor Covenant

We welcome community contributions to this project.

Please read our Contributor Guide for more information on how to get started. Please also read our Contributor Terms before you make any contributions.

Any contribution intentionally submitted for inclusion in an Embark Studios project, shall comply with the Rust standard licensing model (MIT OR Apache 2.0) and therefore be dual licensed as described below, without any additional terms or conditions:

License

This contribution is dual licensed under EITHER OF

at your option.

For clarity, "your" refers to Embark or any other licensee/user of the contribution.

server-code-exciser's People

Contributors

tvandijck avatar phoglund avatar temaran avatar

Stargazers

Anton Nikolaienko avatar никита avatar Ziλ∀ avatar  avatar

Watchers

Mathias Tervo avatar  avatar James Cloos avatar Johan Andersson avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.