Thanks for making me laugh after having to facepalm.Schol-R-LEA wrote:And to the shock and amazement of absolutely no one.

Thanks for making me laugh after having to facepalm.Schol-R-LEA wrote:And to the shock and amazement of absolutely no one.
Code: Select all
//Comments with PHP-style verbosity for the full
//effects that each of them cause. It will make
//for a much better reference from the code itself
//and much easier to read and understand.
Code: Select all
int OPCODE__Application_get_Executable_Path(char **Executable_Path);
FILE * OPCODE__Application_open_Local_ReadOnly_ASCII_7bit_Name_BinaryFile(char *file_name);
FILE * OPCODE__Application_open_Local_ReadWrite_ASCII_7bit_Name_BinaryFile(char *file_name);
int OPCODE__Application_read_C_long_BinaryFile(FILE *srcfilehandle, long *longvalue);
int OPCODE__Application_write_C_long_BinaryFile(FILE *srcfilehandle, long longvalue);
int OPCODE__Application_write_C_long_BinaryFile_Position(FILE *srcfilehandle, long longvalue, unsigned long filepos);
int OPCODE__Application_write_C_long_BinaryFile_PositionPreserve(FILE *srcfilehandle, long longvalue, unsigned long filepos);
int OPCODE__Application_read_C_unsigned_char_byte_BinaryFile(FILE *srcfilehandle, unsigned char *charvalue);
long OPCODE__Application_read_C_unsigned_char_buffer_BinaryFile(FILE *srcfilehandle, unsigned char **charvalue, long length);
long OPCODE__Application_write_C_unsigned_char_buffer_BinaryFile(FILE *srcfilehandle, unsigned char *charvalue, unsigned long length);
long OPCODE__Application_writeln_C_unsigned_char_buffer_BinaryFile(FILE *srcfilehandle, unsigned char *charvalue, unsigned long length);
long OPCODE__Application_write_C_unsigned_char_buffer_BinaryFile_PositionPreserve(FILE *srcfilehandle, unsigned char *charvalue, unsigned long length);
long OPCODE__Application_writeln_C_unsigned_char_buffer_BinaryFile_PositionPreserve(FILE *srcfilehandle, unsigned char *charvalue, unsigned long length);
long OPCODE__Application_get_Opened_File_Size(FILE *filehandle);
int OPCODE__Application_move_File_Position(FILE *srcfilehandle, long newabspos);
long OPCODE__Application_get_File_Position(FILE *srcfilehandle);
int OPCODE__Application__is_EOF(FILE *filehandle);
long OPCODE__Compiler_BinarySourceFile_ASCII_8bit_find_Nearest_NewlineMarkers(FILE *src, FILE *lines_dat_file);
void OPCODE__Compiler_copy_ASCIIZ_string(unsigned char *src, unsigned char **dest);
int OPCODE__Compiler_Print_ASCII_7bit_String(char *str);
int OPCODE__Compiler_Println_ASCII_7bit_String(char *str);
int OPCODE__Compiler_Print_ASCII_7bit_C_long_HexString(long value);
int OPCODE__Compiler_is_Version_String_Request(char *cmdlinearg);
void OPCODE__Compiler_Print_Version_to_Screen();
int OPCODE__Compiler_Create_build_Directory(char *str);
int OPCODE__Compiler_Open_Global_Compilation_Files();
int OPCODE__Compiler_define_ASCII_text_lines(FILE *lines_metadata_file, FILE *srcfilehandle);
int OPCODE__Compiler_Load_ASCII_Text_File(FILE *filehandle, FILE *line_data_file);
void OPCODE__Compiler_Unload_ASCII_Text_File(FILE *filehandle);
int OPCODE__Compiler_Switch_ASCII_Text_File(FILE *filehandle);
long OPCODE__Compiler_BinarySourceFile_ASCII_8bit_readline(FILE *src, FILE *lines_dat_file, unsigned long linenumber);
long OPCODE__Compiler_BinarySourceFile_ASCII_8bit_readline_char_size(FILE *src, FILE *lines_dat_file, unsigned long linenumber, unsigned long charpos, unsigned long size);
long OPCODE__Compiler_BinarySourceFile_ASCII_8bit_getLength_line_char(FILE *lines_dat_file, unsigned long linenumber, unsigned long charpos);
long OPCODE__Application_read_C_ASCIIZ_byte_string_BinaryFile(FILE *srcfilehandle, unsigned long length);
long OPCODE__Compiler_BinarySourceFile_ASCII_8bit_goto_line_char(FILE *src, FILE *lines_dat_file, unsigned long linenumber, unsigned long charpos);
long OPCODE__Compiler_BinarySourceFile_ASCII_8bit_get_line_char_from_fileOffset(FILE *src, FILE *lines_dat_file, unsigned long fileOffset, unsigned long *linenumber, unsigned long *charpos);
int OPCODE__Compiler_BinarySourceFile_ASCII_8bit_compare_string(FILE *src0, unsigned long file0ptrpos, FILE *src1, unsigned long file1ptrpos, unsigned long length, int movePointer);
int OPCODE__Compiler_ASCII_8bit_compare_string(unsigned char *str0, unsigned char *str1, unsigned long str0len);
Code: Select all
//General use variables:
///
//General use variables:
///
unsigned char *COMPILER__fileBuf0000=NULL;
long COMPILER__fileBuf0000_logical_file_offset=0;
long COMPILER__fileBuf0000_file_buffer_offset=0;
long COMPILER__fileBuf0000_charbuflen=0;
long COMPILER__fileBuf0000_origfilepos0=0;
long COMPILER__fileBuf0000_newlineMarkerSZ=0;
long COMPILER__fileBuf0000_bufferOverrun=0;
Code: Select all
#ifndef LIB_H
#define LIB_H 1
extern int lib_var;
extern void lib_func();
#ifdef USING_LIB
#define var lib_var
#define func lib_func
#endif
#endif
Code: Select all
#define USING_LIB
#include "lib.h"
...
Code: Select all
assignment : identifier, "=", expression ;
identifier : /[A-Z_a-z][0-9A-Z_a-z]*/
...
Code: Select all
typedef struct _TreeNode {
_TreeNode *nextSibling;
_TreeNode *firstChild;
} TreeNode;
typedef struct {
TreeNode treeNode;
Identifier identifier;
Expression expression;
} Assignment;
bool getAssignment(Assignment *assignment, Context *context) {
Token token;
// expect identifier
if (!getIdentifier(&assignment->identifier, context))
return false;
// expect "="
if (!getToken(&token, context) || token.type != TOKEN_EQUALS)
return false;
// expect expression
if (!getExpression(&assignment->expression, context))
return false;
return true;
}
~ keeps advertising his project, not only in this thread. Among the (well-earned) derision there are lots of helpful remarks, pointers etc.; these have been always there, the derision has grown over time.zaval wrote:it gets ugly, you all.
On the contrary, keeping quiet shows a total lack of interest. Much more effective.Solar wrote: Keeping quiet about it is, effectively, endorsement.
Definitely. I don't fight with ~ anymore, since it's been proven it accomplishes nothing. I instead went and reported yesterday some of his posts in the most recent topics to bring moderator attention. Furthermore, I don't think people joking about ~ or about hooking a bot into ~'s account or something is ok either, since it makes us look hostile (in the eyes of those who don't know about ~). I reported some such posts too yesterday.MichaelFarthing wrote:On the contrary, keeping quiet shows a total lack of interest. Much more effective.Solar wrote:Keeping quiet about it is, effectively, endorsement.
OK, I will admit that the snipe I made about the post being made by a chatbot was in poor taste. I wasn't seriously suggesting that someone had done that; I was simply commenting on how impenetrable ~'s post was, and comparing him to another poster (Trident), who was known for posts that were so hard to follow that they seemed to have come out of a Markov Chain text generator (we'd joked about that regarding him, too, back in the day).glauxosdever wrote:Definitely. I don't fight with ~ anymore, since it's been proven it accomplishes nothing. I instead went and reported yesterday some of his posts in the most recent topics to bring moderator attention. Furthermore, I don't think people joking about ~ or about hooking a bot into ~'s account or something is ok either, since it makes us look hostile (in the eyes of those who don't know about ~).
Well that's a good five minute's work. You could have done that rather than making your last post.~ wrote:What I need to do next is writing a function that lets me see whether the first non-blank character in the current line is '#', and if so, see if it's an include directive, and then see if the file is enclosed in <> or "" to search for the included file in the corresponding compiler "include" or current source directories.