Skip to content

Commit 2e55181

Browse files
author
Timchenkovich
committed
Better naming
1 parent 102023f commit 2e55181

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

Diff for: asm/CMakeLists.txt

+7-7
Original file line numberDiff line numberDiff line change
@@ -7,38 +7,38 @@ list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
77
include(BootstrapIsa)
88

99
bootstrap_isa(${CMAKE_CURRENT_SOURCE_DIR}/asm.isa)
10-
set(ASM_INCLUDE_DIRS ${asm_GENERATED_DIR})
10+
set(ASM_GENERATED_INCLUDE_DIR ${asm_GENERATED_DIR})
1111

1212
include_directories(
1313
module-context
1414
${ANTLR4_INCLUDE_DIRS}
1515
func-creator
1616
source-descriptor
1717
${SIM_PATH}
18-
${ASM_INCLUDE_DIRS}
18+
${ASM_GENERATED_INCLUDE_DIR}
1919
)
2020

2121
# once instruction grammars are generated, initialize antlr generator chain
2222
antlr_target(
23-
IsaLexer
23+
IsaInstructionsLexer
2424
${asm_INSTRUCTION_LEXER}
2525
LEXER
2626
OUTPUT_DIRECTORY ${asm_GENERATED_DIR}
27-
DEPENDS generateInstructionGrammar ${asm_GRAMMAR_SOURCES}
27+
DEPENDS generateInstructionsGrammar ${asm_GRAMMAR_SOURCES}
2828
)
2929

3030
antlr_target(
3131
AsmLexer
3232
${CMAKE_CURRENT_SOURCE_DIR}/asmLexer.g4
3333
LEXER
34-
DEPENDS_ANTLR IsaLexer
34+
DEPENDS_ANTLR IsaInstructionsLexer
3535
OUTPUT_DIRECTORY ${asm_GENERATED_DIR}
3636
COMPILE_FLAGS -lib ${asm_GENERATED_DIR}
3737
)
3838

3939

4040
antlr_target(
41-
IsaParser
41+
IsaInstructionsParser
4242
${asm_INSTRUCTION_PARSER}
4343
PARSER
4444
DEPENDS_ANTLR AsmLexer
@@ -52,7 +52,7 @@ antlr_target(
5252
PARSER
5353
LISTENER
5454
VISITOR
55-
DEPENDS_ANTLR IsaParser
55+
DEPENDS_ANTLR IsaInstructionsParser
5656
COMPILE_FLAGS -lib ${asm_GENERATED_DIR}
5757
OUTPUT_DIRECTORY ${asm_GENERATED_DIR}
5858
)

Diff for: asm/cmake/BootstrapIsa.cmake

+4-4
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,17 @@ macro(bootstrap_isa isaPathStr)
1919
endforeach()
2020

2121

22-
set(${isaName}_INSTRUCTION_LEXER "${CMAKE_CURRENT_BINARY_DIR}/${outputDir}/${isaName}InstructionLexer.g4")
23-
set(${isaName}_INSTRUCTION_PARSER "${CMAKE_CURRENT_BINARY_DIR}/${outputDir}/${isaName}InstructionParser.g4")
24-
set(${isaName}_GRAMMAR_SOURCES ${${isaName}_INSTRUCTION_PARSER} ${${isaName}_INSTRUCTION_LEXER})
22+
set(${isaName}_INSTRUCTIONS_LEXER "${CMAKE_CURRENT_BINARY_DIR}/${outputDir}/${isaName}InstructionLexer.g4")
23+
set(${isaName}_INSTRUCTIONS_PARSER "${CMAKE_CURRENT_BINARY_DIR}/${outputDir}/${isaName}InstructionParser.g4")
24+
set(${isaName}_INSTRUCTIONS_GRAMMAR_SOURCES ${${isaName}_INSTRUCTIONS_PARSER} ${${isaName}_INSTRUCTIONS_LEXER})
2525

2626

2727
add_custom_command(
2828
OUTPUT ${${isaName}_GENERATED_SOURCES} ${${isaName}_GRAMMAR_SOURCES}
2929
COMMAND mkdir -p ${outputDir} && cd ${outputDir} && ${CMAKE_BINARY_DIR}/asm/isa-creator/bootstrapIsa ${isaPath}
3030
DEPENDS ${CMAKE_BINARY_DIR}/asm/isa-creator/bootstrapIsa ${isaPath})
3131

32-
add_custom_target(generateInstructionGrammar DEPENDS ${${isaName}_GRAMMAR_SOURCES})
32+
add_custom_target(generateInstructionGrammar DEPENDS ${${isaName}_INSTRUCTIONS_GRAMMAR_SOURCES})
3333

3434
set(${isaName}_GENERATED_DIR ${CMAKE_CURRENT_BINARY_DIR}/${outputDir})
3535
set(${isaName}_ISA_SOURCES ${${isaName}_GENERATED_SOURCES})

0 commit comments

Comments
 (0)