Przeglądaj źródła

Remove unnecessary markers.

tags/v0.3
Ben Kurtovic 11 lat temu
rodzic
commit
4663563ce4
2 zmienionych plików z 4 dodań i 4 usunięć
  1. +3
    -3
      mwparserfromhell/parser/tokenizer.h
  2. +1
    -1
      mwparserfromhell/parser/tokenizer.py

+ 3
- 3
mwparserfromhell/parser/tokenizer.h Wyświetl plik

@@ -41,10 +41,10 @@ SOFTWARE.
#define ALPHANUM "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"

static const char* MARKERS[] = {
"{", "}", "[", "]", "<", ">", "|", "=", "&", "#", "*", ";", ":", "/",
"\\", "\"", "-", "!", "\n", ""};
"{", "}", "[", "]", "<", ">", "|", "=", "&", "#", "*", ";", ":", "/", "-",
"\n", ""};

#define NUM_MARKERS 20
#define NUM_MARKERS 17
#define TEXTBUFFER_BLOCKSIZE 1024
#define MAX_DEPTH 40
#define MAX_CYCLES 100000


+ 1
- 1
mwparserfromhell/parser/tokenizer.py Wyświetl plik

@@ -58,7 +58,7 @@ class Tokenizer(object):
START = object()
END = object()
MARKERS = ["{", "}", "[", "]", "<", ">", "|", "=", "&", "#", "*", ";", ":",
"/", "\\", '"', "-", "!", "\n", END]
"/", "-", "\n", END]
MAX_DEPTH = 40
MAX_CYCLES = 100000
regex = re.compile(r"([{}\[\]<>|=&#*;:/\\\"\-!\n])", flags=re.IGNORECASE)


Ładowanie…
Anuluj
Zapisz