BaCon
'''BaCon''', the BASIC Converter, by Peter van Eerten.
BaCon is a free BASIC to C translator for Unix-based systems, which runs on most Unix/Linux/BSD platforms, including MacOSX. It intends to be a programming aid in creating tools which can be compiled on different platforms (including 64bit environments), while trying to revive the days of the good old BASIC.
BaCon can be described as a translator, a converter, a source-to-source compiler, a transcompiler or a transpiler. It also can be described as a very elaborate preprocessor to C. BaCon is implemented in generic shell script and in itself. Therefore, to start using Bacon, the target system must have either Korn Shell, or ZShell, or Bourne Again Shell (BASH) available. Furthermore, BaCon also works with a newer Kornshell implementation like the MirBSD Korn Shell.
The shell script implementation can convert and compile the BaCon version of BaCon. This will deliver the binary version of BaCon which has an extremely high conversion performance. On newer systems, the average conversion rate usually lies above 10.000 lines per second.
Code converted by BaCon can be compiled by GCC, the Compaq C Compiler, TCC, the clang/LLVM compiler (and possibly by other C compilers), but also by C++ compilers like g++ or clang++.
See Also
Tasks
- 100 doors
- A+B
- ABC Problem
- Align columns
- Anagrams
- Anagrams/Deranged anagrams
- Arithmetic/Integer
- Array concatenation
- Assertions
- Associative array/Creation
- Associative array/Iteration
- Averages/Median
- Bacon cipher
- Binary digits
- Caesar cipher
- Calendar
- Call a function in a shared library
- Character codes
- Check that file exists
- Color of a screen pixel
- Command-line arguments
- Comments
- Concurrent computing
- Copy a string
- Count occurrences of a substring
- Create a file
- Date format
- Day of the week
- Delete a file
- Determine if a string is numeric
- Dutch national flag problem
- Egyptian division
- Empty directory
- Empty string
- Enumerations
- Environment variables
- Even or odd
- Execute Brainfuck
- Execute a system command
- Factorial
- Find limit of recursion
- FizzBuzz
- Flatten a list
- Fork
- Formatted numeric output
- Get system command output
- Greatest element of a list
- HTTP
- HTTPS
- Handle a signal
- Hello world/Graphical
- Hello world/Line printer
- Hello world/Newline omission
- Hello world/Standard error
- Hello world/Web server
- Hostname
- Include a file
- Integer comparison
- LZW compression
- Last letter-first letter
- Leap year
- Letter frequency
- Literals/Integer
- Loops/Break
- Loops/Do-while
- Loops/Downward for
- Loops/For with a specified step
- Loops/While
- MAC Vendor Lookup
- MD5
- Mutual recursion
- N'th
- Odd word problem
- OpenGL
- Ordered words
- Palindrome detection
- Parallel Brute Force
- Phrase reversals
- Pick random element
- Program termination
- Proper divisors
- Quine
- Rate counter
- Read a file line by line
- Read entire file
- Rename a file
- Rep-string
- Repeat a string
- Return multiple values
- Reverse a string
- Reverse words in a string
- Rot-13
- Run-length encoding
- SHA-256
- Self-hosting compiler
- Short-circuit evaluation
- Sort an integer array
- Split a character string based on change of character
- String length
- Sum of squares
- System time
- Time a function
- Tokenize a string
- Trigonometric functions
- URL decoding
- Unicode variable names
- Unix/ls
- Variadic function
- Walk a directory/Non-recursively
- Walk a directory/Recursively
- Window creation
- Word wrap
- Write entire file
- Zero to the zero power