Skip to content

Commit

Permalink
Start of experiment with a basic calculator.
Browse files Browse the repository at this point in the history
This is a throwaway so I can debug some of the HLSL parsing code, and get a
 better idea of what I want to do there. This will eventually merge back
 into the default branch with the right bits going into the compiler code.

--HG--
branch : calculator-experiment
  • Loading branch information
icculus committed Feb 8, 2010
1 parent 10ec4cb commit 963fd46
Show file tree
Hide file tree
Showing 4 changed files with 616 additions and 0 deletions.
15 changes: 15 additions & 0 deletions CMakeLists.txt
Expand Up @@ -76,6 +76,21 @@ SET_SOURCE_FILES_PROPERTIES(
PROPERTIES OBJECT_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/mojoshader_parser_hlsl.h"
)

# Calculator test stuff...
ADD_CUSTOM_COMMAND(
OUTPUT "${CMAKE_CURRENT_SOURCE_DIR}/calculator.h"
MAIN_DEPENDENCY "${CMAKE_CURRENT_SOURCE_DIR}/calculator.lemon"
DEPENDS lemon "${CMAKE_CURRENT_SOURCE_DIR}/misc/lempar.c"
COMMAND "${LEMON}"
ARGS -q "-T${CMAKE_CURRENT_SOURCE_DIR}/misc/lempar.c" "${CMAKE_CURRENT_SOURCE_DIR}/calculator.lemon"
)
SET_SOURCE_FILES_PROPERTIES(
calculator.c
PROPERTIES OBJECT_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/calculator.h"
)
ADD_EXECUTABLE(calculator calculator.c)
TARGET_LINK_LIBRARIES(calculator mojoshader)

FIND_PROGRAM(RE2C re2c DOC "Path to re2c command line app: http://re2c.org/")
IF(NOT RE2C)
MESSAGE(STATUS "re2c missing. You can go on, but can't rebuild the lexer.")
Expand Down

0 comments on commit 963fd46

Please sign in to comment.