Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

2837
LINES

< > BotCompany Repo | #1026023 // #759 backup with reTok_multi in tok_conditionals (seems slower?)

JavaX source code (desktop) - run with: x30.jar

Download Jar.

java.lang.RuntimeException: Unknown token 2: <: 
Warning: session_start(): open(/var/lib/php/sessions/sess_f9fr8avtgpd5ncc37gls4ocv16, O_RDWR) failed: No space left on device (28) in /var/www/tb-usercake/models/config.php on line 51

Warning: session_start(): Failed to read session data: files (path: /var/lib/php/sessions) in /var/www/tb-usercake/models/config.php on line 51
{"1000567":"isInteger","1000619":"get function","1000628":"first function","1000630":"call function(s) for reflective calls to objects\/classes","1000644":"shorten function","1000658":"print function (=System.out.println + logging in memory)","1000659":"fail functions (improved)","1000688":"javaTok function - Java + JavaX tokenizer, but parses just about anything","1000709":"formatSnippetID functions","1000798":"dropFirst function (drop first elements of array or chars of string - synonym of \"drop\")","1000801":"now function","1000810":"join function + array version","1000811":"parseInt - returns 0 on \"\" or null","1000997":"loadSnippet and dependencies (with (hopefully) better caching, current)","1001012":"getSnippetTitle","1001038":"last function (get last element of list or last character in string)","1001046":"findEndOfBlock - synonym of tok_findEndOfBlock","1001047":"litlist (literal list)","1001101":"\"getOpt\" function (get field by reflection, return null if not there)","1001135":"isQuoted - now accurate by default","1001157":"allClasses [works on tokenization, also finds enum and interface and most JavaX constructs]","1001158":"clearAllTokens","1001161":"getVarDeclarationName","1001162":"getClassDeclarationName (also works with interfaces and enums)","1001165":"findEndOfBracketPart","1001204":"findMainClass","1001241":"concatLists","1001246":"parseLong","1001326":"programID","1001333":"sameSnippetID","1001396":"saveProgramTextFile","1001518":"l function (synonym of length), length of arrays, strings, lists, size of maps","1001598":"assertTrue - no longer accepts a function returning a boolean","1001606":"include (hotwire with outer program id)","1001634":"cloneList - now safely clones a synchroList (synchronizing on it)","1001641":"hasCodeTokens","1001735":"unquote - opposite of quote. also takes single quoted strings","1001741":"or function","1001807":"saveMainJava (function)","1001828":"defaultTranslate","1001865":"neq function","1001878":"indexOf - fills various gaps in java.util.List API","1001885":"replaceKeywordBlock","1001892":"isIdentifier - synonym of isJavaIdentifier","1001913":"unnull","1001927":"diff - get elements of one collection that are not in another collection (works on any collection type)","1001992":"str function (=String.valueOf + extensions)","1001996":"loadVariableDefinition - executes a variable definition from up-to-date source","1002042":"keys function","1002048":"dropSuffix - note the (maybe) curious argument order","1002071":"trim function","1002073":"joinQuoted","1002108":"empty - extended synonym of isEmpty","1002110":"dropPrefix","1002118":"getBracketMap - uses curly and round brackets (also takes x-tok [token lists containing sublists])","1002133":"jreplace","1002135":"indexOfSubList","1002224":"hotwireCached - hotwire with cached classes - calls main once per class","1002284":"splitAtJavaToken - synonym of splitByJavaToken","1002285":"assertIdentifier - synonym of assertIsIdentifier","1002287":"lithashset","1002310":"subList function - use instead of List.subList","1002348":"nempty - not empty","1002380":"loadMainJava (current)","1002425":"runTranslatorQuick","1002429":"jfind(s, pattern) - returns C index","1002453":"findEndOfStatement (broken version, use tok_findEndOfStatement instead)","1002497":"smartIndexOf - returns l(s) if not found","1002500":"values function","1002637":"substring - exception-free (safe) version of String.substring","1002692":"mc method - get main class of program","1002694":"identityHashCode","1002769":"includeInMainLoaded - now reToks","1002990":"contains - like Collection.contains, but allows a null collection and arrays. also for strings","1003137":"ping - allow pausing all threads & thread-inserted actions","1003242":"fsI - synonym of formatSnippetID","1003268":"findFunctionInvocations - parse Java source for function invocations - removes \"please include function\" lines - TODO: type arguments","1003329":"cic - short for containsIgnoreCase","1003367":"reTok - javaTok in place","1003369":"replaceTokens (no reTok)","1003382":"ll - synonym of litlist (literal list)","1003478":"clearTokens - synonym of clearAllTokens","1003480":"innerClassesOfMain","1003481":"findInnerClassOfMain - by name","1003483":"callF + safeCallF - call a Runnable, func, voidfunc or function name","1003523":"scanOverExpression","1003598":"countChar - count occurrences of a character in a string","1003652":"eqOneOf - equals, multiple checks","1003771":"psI - synonym of parseSnippetID","1003807":"_get - (partial) synonym of get - when get clashes with another method","1003848":"replaceKeywordBlockDyn","1003852":"tok_addReturn - convert expression to return statement; if it's statements already, leave it alone","1003875":"loadSnippets v2 - fetch multiple snippets in one go - yes it uses POST (LIVE)","1003897":"printStruct - short for printStructure","1004049":"dropPrefixTrim","1004051":"findFunctionDefs (finds static functions, LIVE in #759)","1004092":"tok_importedClassNames (just the names, not the packages)","1004162":"jfindAll","1004219":"Pair - value pair; sorted by a, then b","1004220":"pair - make value pair","1004240":"tok_addSemicolon","1004519":"f2s - same as File.getAbsolutePath(); returns null on null","1004582":"javaTokC - codeTokensOnly+javaTok","1004948":"jreplace1 - go through code just once","1005015":"saveTextFileVerbose","1005025":"splitJavaFiles - split a joined source into .java files","1005028":"jtok - customizable javaTok","1005595":"quote - Java-compatible string quoting with \"\". now also escapes \\t","1005762":"interceptPrintInThisThread","1006239":"sysNow - access System nano-timer in milliseconds (more precise than now(), but not related to date)","1006347":"tok_autoCloseBrackets","1006502":"tok_repeatWithSleep","1006506":"numberOfCores - get number of cores in current computer","1006535":"javaxCachesDir","1006800":"rjfind - find last occurrence, returns C index","1007211":"rethrow - rethrow an exception as RuntimeException","1007212":"startsWithLowerCaseOrUnderscore","1007213":"containsIC - short for containsIgnoreCase","1007593":"tok_expandVarCopies","1007768":"faster eq function (if you never compare a BigInt to an Int or Long), LIVE","1007937":"F1 - function with one argument","1008164":"cloneSubList - synonym of newSubList - return a sublist as new ArrayList","1008249":"joinWithSpace - synonym of joinWithSpaces","1008270":"concatMap_strings","1008454":"trimJoin","1008518":"print_byThread","1008631":"class IntRange - range of ints (start\/end)","1008640":"neqOneOf - doesn't equal one of","1008654":"intRange - construct IntRange","1008758":"getThreadLocal - synonym of getThreadLocalOpt + another version","1008877":"eqGet - combines eq() and get()","1008899":"replaceTokens_reTok","1008946":"sfu - synonym of structureForUser - structure() without too many back refs","1008954":"tok_singleQuoteIdentifiersToStringConstants","1008964":"tok_tokenBeforeLonelyReturnValue","1008965":"tok_autosemi","1009010":"replaceKeywordPlusQuotedBlock","1009082":"isBracketHygienic - synonym of testBracketHygiene","1009156":"joinWithComma - join with \", \" separator","1009304":"javax - synonym of getJavaX","1009319":"joinSubList - join(subList(...)) - TODO: optimize","1009462":"jreplace_dyn","1009540":"tlft_j - synonym of toLinesFullTrim_java - also drop Java comments","1009544":"setIntersection","1009545":"tok_hasClassRef2 - leaves out ifclass blocks","1009714":"tok_doAsMethodName - allow \"do\" as a method name (replace with \"dO\")","1010085":"reTok_modify - reTok and call function on modified part","1010086":"includeInMainLoaded_reTok","1010089":"indexedList2 - convert List to IndexedList2 if necessary","1010092":"tok_findImports","1010097":"vmKeepWithProgramMD5_get - get program variable held by VM if program's MD5 matches","1010098":"vmKeepWithProgramMD5_save - save program variable in VM, noting program's MD5","1010102":"doubleReTok - reTok in two places (i1 through j1 and i2 through j2)","1010313":"tok_unpair - \"S a, S b = unpair ...;\" construct","1010375":"tok_findTranslators","1010513":"tok_cachedFunctions - use class Cache (single object cache)","1010547":"tok_endOfImplementsList","1011072":"startsAndEndsWith","1011473":"hasUnclosedStringLiterals","1011643":"javaParser_makeAllPublic_keepComments (old)","1011790":"tok_typesOfParams - converts ... to []","1011895":"nowFuture","1011896":"getAllFutures","1011897":"getFuture","1012009":"tok_hasTranslators - doesn't change tok","1012012":"formatInt - format an int (or long) with fixed minimum number of digits","1012023":"reTok_multi - reTok multiple token ranges efficiently","1012025":"tok_moveImportsUp using reTok_multi (LIVE)","1012679":"ciSet - synonym of caseInsensitiveSet","1012742":"tok_recordDecls","1012971":"tokPrepend - prepend string to a token","1013206":"tok_doubleFor_v2","1013657":"standardFunctions - synonym of standardFunctionNames - in declaration order","1013759":"tok_replaceWith - process \"replace * with *.\" statements; applies to current block only","1014244":"tok_p_old - replace p-... {} (LIVE)","1014426":"TokCondition","1014458":"javaParser_reparse_keepComments [OLD]","1014459":"containsOneOfIC","1014855":"jfindOneOf","1015265":"tok_kiloConstants","1015548":"tok_toNonPrimitiveTypes - convert to boxed type","1015562":"usualJavaClassNames - typically used SDK class names, you can refer to this as e.g. just O instead of O.class","1015648":"tok_scopes","1015769":"extractAndPrintJavaParseError","1015999":"tokenIndexWithoutIfclass_forStdClasses","1016000":"neqGet - combines neq() and get()","1016329":"stringToLegalIdentifier","1016480":"jfindOneOf_cond","1016584":"tok_importedStaticFunctionNames (just the names, not the packages)","1016767":"tok_listComprehensions","1017000":"tokCondition_beginningOfMethodDeclaration","1017171":"tempInterceptPrint","1017208":"tok_mapLikeFunctions","1017378":"tok_typeAA","1017528":"tok_expandLPair - LPair<...> to L>","1017552":"tok_ifCast","1017567":"tok_findEndOfStatement (works, but might have trouble with for + block)","1017958":"tok_addFieldOrder","1017971":"tok_autoQuineFunc","1018532":"tok_mapMethodLikeFunctions (functions taking an identifier as first argument)","1018678":"tok_moduleClassDecls","1018808":"replaceKeywordBlock_dyn2_legacy - avoid syntax problem with func and many parameters","1019135":"syncMap - clone map and map over that; also: make a synchronized HashMap (or other map)","1019660":"tok_switchTo","1020654":"clearTokens_reTok","1020655":"cloneHashSet - safely clone a collection to HashSet","1020762":"tokPrepend_reTok - prepend string to a token, reTok","1020763":"tok_compactModules","1020838":"tok_tokenLeftOfExpression - does the token at i indicate there an expression right of it?","1020928":"tok_overridableFunctionDefs","1020932":"tok_collectMetaPostBlocks","1020989":"tok_simplyCachedFunctions","1021014":"defaultJavaXTranslatorID","1021015":"setDefaultJavaXTranslatorID","1021023":"standardFunctionSnippet - synonym of lookupStandardFunction","1021029":"singlePlusList - synonym of itemPlusList","1021083":"neqGetOneOf","1021539":"regexpContains - synonym of regexpFinds","1021796":"tok_equalsCast","1021870":"tok_autoLongConstants","1022361":"combinedMap - uses CombinedMap (virtual union with limited methods)","1022527":"tok_forUnnull - now also allows fOr (...)","1022532":"combineIntRanges","1022534":"tok_directSnippetRefs","1022730":"tok_debugStatements","1022735":"tok_unimplementedMethods","1022743":"tok_switchableFields","1022746":"tok_shortVisualize","1022749":"tok_whileGreaterThan","1022750":"tokSet_reTok - synonym of tokSet_withReTok","1022751":"tok_ifThenEnd - not nestable yet!","1022794":"tok_expandLT3 - LT3<...> to L>","1023075":"tok_optPar - \"optPar int bla = 5;\". also boolPar","1023091":"tok_for_unpair","1023092":"tok_for_single","1023409":"tok_virtualTypes","1023446":"tok_dropExtraCommas","1023486":"tok_expandPairL - PairL<...> to Pair>","1023533":"tok_expandStarConstructors","1023741":"tok_replaceColonEqualsSyntax","1023760":"smartIndexOfOneOf - synonym of smartIndexOfAny","1024175":"tok_autoInitVars","1024192":"tok_fixBadTypeParameterOrder","1024494":"tok_delegateTo","1024894":"jfind_check - jfind with quick-check for existence of key token in indexed list","1024896":"tok_qFunctions - \"q {\" for running function in module queue","1024937":"tok_questionDot - uses rCallF in the transpilation","1025029":"tok_autoDisposeFields","1025037":"tok_findBeginningOfStatement (probably doesn't always work)","1025200":"tok_embeddedFunctions - transpile function with JavaX keyword \"embedded\"","1025204":"getAndInc","1025205":"makeVar - make anonymous variable (fairly dummy version, but works)","1025219":"clearTokensAndReTok - synonym of clearTokens_reTok","1025303":"tok_selfType - \"selfType\" to enclosing class name","1025379":"tok_collectTransformers","1025380":"tok_processMetaBlocks","1025381":"tok_runMetaTransformer","1025382":"tok_metaTransformNow - collect & run meta-transformNow { ... } blocks","1025425":"tok_ifRecordMatch","1025426":"not - boolean negation, return null on null","1025432":"tok_once - do ... while false (so you can use break inside)","1025434":"tok_equalsOptCast","1025503":"replaceKeywordPlusQuotedOrIDBlock","1025513":"tokenIndexedList3 - convert List to TokenIndexedList3 if necessary","1025515":"IContentsIndexedList","1025520":"tok_standardBot1","1025530":"jreplace_check - jreplace with quick-check for existence of token","1025573":"tok_processSimplified","1025749":"tok_quicknew - new implementation of quickNew","1025802":"findCodeTokens with IContentsIndexedList2 [OK]","1025811":"javaParser_makeAllPublic - also pretty-prints whole source [new JavaParser version]","1025861":"tok_timedCachedFunctions - use class TimedCache (single object cache)","1026022":"clearTokens_addToReToksOrReTok","1031503":"tok_findRewrites","1032847":"cacheGet - synonym of loadSnippet_cached (as in #759)","1034648":"structure function (v21, supporting enums, LIVE)","1036305":"tok_conditionals","1036306":"tok_ifdef"} at main.fail(m1008705.java:1589) at main$jsonDecode_Y.fail_base(m1008705.java:14008) at main$jsonDecode_Y.fail(m1008705.java:14006) at main$jsonDecode_Y.parseExpr(m1008705.java:14058) at main$jsonDecode_Y.parse(m1008705.java:14012) at main.jsonDecode(m1008705.java:13990) at main.jsonDecodeMap(m1008705.java:12844) at main.getSnippetTitles(m1008705.java:10820) at main$JavaXHyperlinker.codeToHTML(m1008705.java:6209) at main.html2(m1008705.java:85) at main.html(m1008705.java:67) at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104) at java.base/java.lang.reflect.Method.invoke(Method.java:577) at main.invokeMethod(m1008705.java:1601) at main.callOpt_withVarargs(m1008705.java:4387) at main.callOpt(m1008705.java:3326) at main.callHtmlMethod2(m1008705.java:11404) at main$MyHTTPD$1.get(m1008705.java:7337) at main$MyHTTPD$1.get(m1008705.java:1) at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104) at java.base/java.lang.reflect.Method.invoke(Method.java:577) at main.invokeMethod(m1008705.java:1601) at main.safeCallF(m1008705.java:642) at main.callF(m1008705.java:611) at main$MyHTTPD.serve(m1008705.java:7373) at main$NanoHTTPD.serve_2(m1008705.java:9572) at main$NanoHTTPD.serve(m1008705.java:9553) at main$NanoHTTPD$HTTPSession.execute(m1008705.java:8453) at main$NanoHTTPD$ClientHandler.run(m1008705.java:7829) at java.base/java.lang.Thread.run(Thread.java:833)

Author comment

Began life as a copy of #759

download  show line numbers  debug dex  old transpilations   

Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

-
Snippet ID: #1026023
Snippet name: #759 backup with reTok_multi in tok_conditionals (seems slower?)
Eternal ID of this version: #1026023/1
Text MD5: 70646b208142bb7d8b5e29324ffeb10c
Author: stefan
Category: javax
Type: JavaX source code (desktop)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-11-08 01:05:45
Source code size: 94791 bytes / 2837 lines
Pitched / IR pitched: No / No
Views / Downloads: 715 / 1175
Referenced in: