Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * The ALCOHOL Programming Language
- * alcohol.h
- *
- * Copyright 2014 Marc Sylvestre <marc.sylvestre@manhydra.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, see <http://www.gnu.org/licenses/>,
- * or if prefer good old fashion postal mail, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- */
- #define INTEGER int
- #define CHARACTER char
- #define HEAP *
- #define STRING CHARACTER*
- #define ARRAYSTR STRING*
- #define FLOAT float
- #define DOUBLE double
- #define GENERIC void
- #define FILEDEF static
- #define SET(a,b) a = b
- #define INITSET(a,b,c) a b = c
- #define HEAP_LOCATION(a) &a
- #define EQUALS ==
- #define IS_GT >
- #define IS_GT_EQ >=
- #define IS_LT <
- #define IS_LT_EQ <=
- #define NOT !
- #define IS_NOT !=
- #define BEGIN_ARGS (
- #define END_ARGS )
- #define NO_ARG BEGIN_ARGS END_ARGS
- #define BEGIN_ROUTINE {
- #define END_ROUTINE }
- #define BEGIN_PROG INTEGER main BEGIN_ARGS INTEGER argc, ARRAYSTR argv END_ARGS BEGIN_ROUTINE
- #define RET return
- #define END_PROG RET 0; END_ROUTINE
- #define TEST(condition) if BEGIN_ARGS condition END_ARGS BEGIN_ROUTINE
- #define OTHERWISE END_ROUTINE else BEGIN_ROUTINE
- #define END_TEST END_ROUTINE
- #define ELSIF(condition) END_ROUTINE else TEST(condition)
- #define ITERATE(condition) while BEGIN_ARGS condition END_ARGS BEGIN_ROUTINE
- #define END_ITERATE END_ROUTINE
- #define TEST_CASES(condition) switch BEGIN_ARGS condition END_ARGS BEGIN_ROUTINE
- #define END_TEST_CASES END_ROUTINE
- #define CASE(value) case value:
- #define CASE_DEFAULT default:
- #define END_CASE break;
- #define INPUT scanf
- #define INPUT_CHARACTER(x) x = getchar()
- #define OUTPUT printf
- #define OUTPUTL puts
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement