bcc (ACS/ACS95/BCS compiler)

Any utility that assists in the creation of mods, assets, etc, go here.
Forum rules
The Projects forums are ONLY for YOUR PROJECTS! If you are asking questions about a project, either find that project's thread, or start a thread in the General section instead.

Got a cool project idea but nothing else? Put it in the project ideas thread instead!

Projects for any Doom-based engine (especially 3DGE) are perfectly acceptable here too.

Please read the full rules for more details.

bcc (ACS/ACS95/BCS compiler)

Postby Positron » Mon Oct 31, 2016 8:11 pm

Happy Halloween, everyone!

bcc is a compiler I've been developing for some time now, and I decided that I should finally give it some exposure on this forum.

bcc attempts to compile three languages: ACS, ACS95, and BCS. ACS is the latest version of ACS as defined by the latest version of acc. ACS95 is the original ACS language developed for Hexen. BCS is an extension of ACS.

BCS is mostly compatible with ACS and provides many extra features, including the following:

  • Structures
  • Enumerations
  • Namespaces
  • Preprocessor
  • Strong types
  • References (limited support)
  • Block scoping
  • Optional function parameters
  • Logical-AND (&&) and Logical-OR (||) are short-circuited
  • foreach loop
  • Nested functions
  • Conditional operator (?:)

An overview of the features can be found in the details file. Example code demonstrating some of the new features can be found in the test directory.

Please give the compiler a try. I appreciate any feedback. Right now, the characteristics of some of the features are fluid. I'm going to take the next few weeks to read your responses before I finalize the features.

This is a big project, and a long time has passed since the last release, so bugs are inevitable. Let me know if you spot any. I will fix them as soon as I can.

Download (Windows binaries): https://github.com/wormt/bcc/releases
Source code: https://github.com/wormt/bcc

Spoiler: For users of a previous version of bcc
Last edited by Positron on Tue Nov 01, 2016 11:55 pm, edited 1 time in total.
Positron
 
Joined: 12 Oct 2016

Re: bcc (ACS/ACS95/BCS compiler)

Postby ZzZombo » Tue Nov 01, 2016 8:06 pm

Awesome, man! My hero! I use BCC exclusively, well, used to use when I had been modding.
ZzZombo
 
Joined: 16 Jul 2012

Re: bcc (ACS/ACS95/BCS compiler)

Postby Nash » Tue Nov 01, 2016 10:11 pm

One of the reasons why I use gdcc-acc was it promised to be "acc but better" and it was indeed effortless to just do a straight copy-pasta of your existing ACS, run it through gdcc-acc and "it just works". And of course from there, I can use the extras like structs, enums etc while still keeping my ACS code style. There's code in my project that's literally several years old before gdcc-acc was invented that I continue to use today with gdcc-acc without problems and without having to re-write anything.

How are things in that regard with bcc? Can I literally just run my existing ACS into it?
User avatar
Nash
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Github ID: nashmuhandes

Re: bcc (ACS/ACS95/BCS compiler)

Postby Positron » Tue Nov 01, 2016 10:47 pm

Nash wrote:One of the reasons why I use gdcc-acc was it promised to be "acc but better" and it was indeed effortless to just do a straight copy-pasta of your existing ACS, run it through gdcc-acc and "it just works". And of course from there, I can use the extras like structs, enums etc while still keeping my ACS code style. There's code in my project that's literally several years old before gdcc-acc was invented that I continue to use today with gdcc-acc without problems and without having to re-write anything.

How are things in that regard with bcc? Can I literally just run my existing ACS into it?


Hey, Nash.

Your old code should work well for the most part. One thing to keep in mind is that the && and || operators are short-circuited, where's in ACS they are not. Radix constants also have a slightly different syntax, but I doubt many even heard of these. You might also have name collisions because some new keywords have been added, but it is unlikely.

If you want to use BCS, which is ACS with the extra features, you'll need to pass the following command-line argument: -x bcs. Alternatively, you can end your script files with a .bcs file extension. The compiler will determine the language to use from the file extension. Any other file extension will make bcc compile your script code like acc.
Positron
 
Joined: 12 Oct 2016

Re: bcc (ACS/ACS95/BCS compiler)

Postby Positron » Wed Nov 02, 2016 12:00 am

I fixed some bugs and made another release. For minor releases, check out: https://github.com/wormt/bcc/releases.
Positron
 
Joined: 12 Oct 2016

Re: bcc (ACS/ACS95/BCS compiler)

Postby Jroc » Wed Nov 02, 2016 1:09 pm

Nash wrote:How are things in that regard with bcc? Can I literally just run my existing ACS into it?


I personally have used BCC to compile many acs projects I've done without issues.
Jroc
 
Joined: 21 Sep 2011


Return to Editors / Asset Manipulation

Who is online

Users browsing this forum: No registered users and 0 guests