Index
Comparaison des résultats
RegExp Lexer :
“1 RegExp”
Multiple RegExp
Expressions régulières
ONE LEVEL LEXER
Exemples :
Source :
"[^"\\\r\n]*(\\.[^"\\\r\n]*)*"
Benchmark sur
exécution(s).
RegExp Lexer
...
Automaton Lexer
...
JavaScript + PHP
MULTI LEVEL LEXER
Syntaxe :
Source
/* 1 - JavaScript syntax */ aaa */ variable n = nInt1/4 + 4/nInt1++ || 10 var oEditor = new EditorSample ( eContent ,{ // a single line comment ( a single quote ' ) aArray : [ true , false , null , undefined , Infinity , NaN ], sDoubleQuoteString : "/* ' a multi line comment */ // a single line comment " , sSingleQuoteString : '/* "\ a multi line string */ // a single line comment ' sBracketsTest1_1 : "{[(", sBracketsTest1_2 : "}])", /* a multi line comment ( a double quote " ) */ }) RegExp.extend({ escape :function( s ){ // Bracket test 2 var re1 = /(\.|\?|\*|\+|\\|\(|\)|\[|\]|\}|\{|\$|\^|\|)/g , re2 = /("|'| |\t)/gm return s.replace( re1 , "\\$1" ) } }) /* 2 - PHP */
Benchmark sur
exécution(s).
RegExp Lexer
...
Automaton Lexer
...