Skip to content

Commit 111d7e9

Browse files
authored
Merge pull request stepcode#456 from starseeker/develop
Fixes for newer clang compilers and more robust parallel building
2 parents ed8390a + db2c3d8 commit 111d7e9

6 files changed

Lines changed: 19 additions & 14 deletions

File tree

cmake/FindLEMON.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ if (LEMON_EXECUTABLE)
141141

142142
# execute lemon
143143
add_custom_command(
144-
OUTPUT ${_out_src_file}
144+
OUTPUT ${_out_src_file} ${_basename}.h
145145
COMMAND ${LEMON_EXECUTABLE} -T${LEMON_TEMPLATE} ${LEMON_EXECUTABLE_opts} ${_in_y_file}
146146
DEPENDS ${Name}_input_cpy
147147
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
@@ -152,7 +152,7 @@ if (LEMON_EXECUTABLE)
152152
add_custom_command(
153153
OUTPUT ${_out_hdr_file}
154154
COMMAND ${CMAKE_COMMAND} ARGS -E rename ${_basename}.h ${_out_hdr_file}
155-
DEPENDS ${_out_src_file}
155+
DEPENDS ${_out_src_file} ${_basename}.h
156156
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
157157
)
158158

include/express/object.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
/***************************/
6969

7070
struct Object {
71-
struct Symbol_ * ( *get_symbol )();
71+
struct Symbol_ * ( *get_symbol )( void * );
7272
char * type; /**< should complete the phrase "X is ..." - i.e., "an entity", "a type", "of unknown type" */
7373
int bits; /**< a bitwise selector of a type, i.e. OBJ_XX_BITS */
7474
};

src/express/expparse.y

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ YYSTYPE yylval;
5151
Express yyexpresult; /* hook to everything built by parser */
5252

5353
Symbol *interface_schema; /* schema of interest in use/ref clauses */
54-
void (*interface_func)(); /* func to attach rename clauses */
54+
void (*interface_func)(struct Scope_ *, Symbol *, Symbol *, Symbol *); /* func to attach rename clauses */
5555

5656
/* record schemas found in a single parse here, allowing them to be */
5757
/* differentiated from other schemas parsed earlier */
@@ -106,7 +106,7 @@ YYSTYPE yylval;
106106

107107
#define ERROR(code) ERRORreport(code, yylineno)
108108

109-
void parserInitState()
109+
void parserInitState( void )
110110
{
111111
scope = scopes;
112112
/* no need to define scope->this */
@@ -402,8 +402,7 @@ aggregate_type(A) ::= TOK_AGGREGATE TOK_OF parameter_type(B).
402402
Symbol sym;
403403
sym.line = yylineno;
404404
sym.filename = current_filename;
405-
ERRORreport_with_symbol(UNLABELLED_PARAM_TYPE, &sym,
406-
CURRENT_SCOPE_NAME);
405+
ERRORreport_with_symbol(UNLABELLED_PARAM_TYPE, &sym, CURRENT_SCOPE_NAME);
407406
}
408407
}
409408
aggregate_type(A) ::= TOK_AGGREGATE TOK_COLON TOK_IDENTIFIER(B) TOK_OF

src/express/expscan.l

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,12 @@
9898
*
9999
* Revision 4.1 90/09/13 16:29:00 clark
100100
* BPR 2.1 alpha
101-
*
101+
*
102102
*/
103-
103+
#include <ctype.h>
104+
#if !defined(isascii) && defined(__isascii)
105+
# define isascii __isascii
106+
#endif
104107
#include "express/basic.h"
105108
#include "express/error.h"
106109
#include "express/lexact.h"

src/express/generated/expparse.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ YYSTYPE yylval;
5757
Express yyexpresult; /* hook to everything built by parser */
5858

5959
Symbol *interface_schema; /* schema of interest in use/ref clauses */
60-
void (*interface_func)(); /* func to attach rename clauses */
60+
void (*interface_func)(struct Scope_ *, Symbol *, Symbol *, Symbol *); /* func to attach rename clauses */
6161

6262
/* record schemas found in a single parse here, allowing them to be */
6363
/* differentiated from other schemas parsed earlier */
@@ -112,7 +112,7 @@ YYSTYPE yylval;
112112

113113
#define ERROR(code) ERRORreport(code, yylineno)
114114

115-
void parserInitState()
115+
void parserInitState( void )
116116
{
117117
scope = scopes;
118118
/* no need to define scope->this */
@@ -2348,8 +2348,7 @@ static void yy_reduce(
23482348
Symbol sym;
23492349
sym.line = yylineno;
23502350
sym.filename = current_filename;
2351-
ERRORreport_with_symbol(UNLABELLED_PARAM_TYPE, &sym,
2352-
CURRENT_SCOPE_NAME);
2351+
ERRORreport_with_symbol(UNLABELLED_PARAM_TYPE, &sym, CURRENT_SCOPE_NAME);
23532352
}
23542353
}
23552354
#line 2356 "expparse.c"

src/express/generated/expscan.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,10 @@
9999
* Revision 4.1 90/09/13 16:29:00 clark
100100
* BPR 2.1 alpha
101101
* */
102+
#include <ctype.h>
103+
#if !defined(isascii) && defined(__isascii)
104+
# define isascii __isascii
105+
#endif
102106
#include "express/basic.h"
103107
#include "express/error.h"
104108
#include "express/lexact.h"
@@ -617,7 +621,7 @@ getTokenText(perplex_t scanner)
617621
#define yyextra scanner->extra
618622

619623
static perplex_t
620-
newScanner()
624+
newScanner(void)
621625
{
622626
perplex_t scanner;
623627
scanner = (perplex_t)calloc(1, sizeof(struct perplex));

0 commit comments

Comments
 (0)