"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/parsetree.cc" between
ragel-7.0.0.10.tar.gz and ragel-7.0.0.11.tar.gz

About: Ragel compiles executable finite state machines from regular languages (C, C++, Obj-C, C#, D, Java, Go and Ruby). Development version.

parsetree.cc  (ragel-7.0.0.10):parsetree.cc  (ragel-7.0.0.11)
/* /*
* Copyright 2001-2006 Adrian Thurston <thurston@colm.net> * Copyright 2001-2018 Adrian Thurston <thurston@colm.net>
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy * Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to * of this software and associated documentation files (the "Software"), to
* deal in the Software without restriction, including without limitation the * deal in the Software without restriction, including without limitation the
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
* sell copies of the Software, and to permit persons to whom the Software is * sell copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions: * furnished to do so, subject to the following conditions:
* *
* The above copyright notice and this permission notice shall be included in al l * The above copyright notice and this permission notice shall be included in al l
* copies or substantial portions of the Software. * copies or substantial portions of the Software.
skipping to change at line 41 skipping to change at line 41
/* Parsing. */ /* Parsing. */
#include "ragel.h" #include "ragel.h"
#include "parsetree.h" #include "parsetree.h"
#include "parsedata.h" #include "parsedata.h"
using namespace std; using namespace std;
ostream &operator<<( ostream &out, const NameRef &nameRef ); ostream &operator<<( ostream &out, const NameRef &nameRef );
ostream &operator<<( ostream &out, const NameInst &nameInst ); ostream &operator<<( ostream &out, const NameInst &nameInst );
/* Read string literal (and regex) options and return the true end. */ /* Read string literal (and regex) options and return the true end. */
const char *checkLitOptions( InputData *id, const InputLoc &loc, const char *dat const char *checkLitOptions( InputData *id, const InputLoc &loc,
a, int length, bool &caseInsensitive ) const char *data, int length, bool &caseInsensitive )
{ {
const char *end = data + length - 1; const char *end = data + length - 1;
while ( *end != '\'' && *end != '\"' && *end != '/' ) { while ( *end != '\'' && *end != '\"' && *end != '/' ) {
if ( *end == 'i' ) if ( *end == 'i' )
caseInsensitive = true; caseInsensitive = true;
else { else {
id->error( loc ) << "literal string '" << *end << id->error( loc ) << "literal string '" << *end <<
"' option not supported" << endl; "' option not supported" << endl;
} }
end -= 1; end -= 1;
skipping to change at line 97 skipping to change at line 98
else { else {
dest[dlen++] = *src++; dest[dlen++] = *src++;
} }
} }
resLen = dlen; resLen = dlen;
resData[resLen] = 0; resData[resLen] = 0;
return resData; return resData;
} }
Key *prepareHexString( ParseData *pd, const InputLoc &loc, const char *data, lon Key *prepareHexString( ParseData *pd, const InputLoc &loc,
g length, long &resLen ) const char *data, long length, long &resLen )
{ {
Key *dest = new Key[( length - 2 ) >> 1]; Key *dest = new Key[( length - 2 ) >> 1];
const char *src = data; const char *src = data;
const char *end = data + length; const char *end = data + length;
long dlen = 0; long dlen = 0;
char s[3]; char s[3];
/* Scan forward over 0x. */ /* Scan forward over 0x. */
src += 2; src += 2;
 End of changes. 3 change blocks. 
5 lines changed or deleted 5 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)