bcc (ACS/ACS95/BCS compiler)

Any utility that assists in the creation of mods, assets, etc, go here. For example: Ultimate Doom Builder, Slade, WadSmoosh, Oblige, etc.
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.
Positron
Posts: 6
Joined: Wed Oct 12, 2016 4:04 am

bcc (ACS/ACS95/BCS compiler)

Post by Positron »

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.
ZzZombo
Posts: 317
Joined: Mon Jul 16, 2012 2:02 am

Re: bcc (ACS/ACS95/BCS compiler)

Post by ZzZombo »

Awesome, man! My hero! I use BCC exclusively, well, used to use when I had been modding.
User avatar
Nash
 
 
Posts: 17454
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia

Re: bcc (ACS/ACS95/BCS compiler)

Post by Nash »

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?
Positron
Posts: 6
Joined: Wed Oct 12, 2016 4:04 am

Re: bcc (ACS/ACS95/BCS compiler)

Post by Positron »

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
Posts: 6
Joined: Wed Oct 12, 2016 4:04 am

Re: bcc (ACS/ACS95/BCS compiler)

Post by Positron »

I fixed some bugs and made another release. For minor releases, check out: https://github.com/wormt/bcc/releases.
Jroc
Posts: 19
Joined: Tue Sep 20, 2011 6:32 pm

Re: bcc (ACS/ACS95/BCS compiler)

Post by Jroc »

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.

Return to “Creation, Conversion, and Editing”