Commits on Jul 6, 2010
  1. @dancor
  2. @dancor

    normedStrUnitIsRegexUnmetaEvenEscaped was never needed

    never ended up using this; realized alphanumeric-ness was the key
    dancor committed Jul 6, 2010
  3. @dancor

    for php regex, an escaped char is meta iff the char is alphanumeric

    and even though '\\0' in particular has no real use,
    it won't match as unmeta:
    php> =preg_split('/a\\#/', 'yyya#zzz')
    array(
      0 => "yyy",
      1 => "zzz",
    )
    php> =preg_split('/a#/', 'yyya#zzz')
    array(
      0 => "yyy",
      1 => "zzz",
    )
    php> =preg_split('/a\\0/', 'yyya0zzz')
    array(
      0 => "yyya0zzz",
    )
    php> =preg_split('/a0/', 'yyya0zzz')
    array(
      0 => "yyy",
      1 => "zzz",
    )
    
    Test Plan:
    $bits = preg_split('/[.@]/', $elattr, 2);
    $bits = preg_split('/\[\.@]/', $elattr, 2);
    $bits = preg_split('/\[\.@\]/', $elattr, 2);
    dancor committed Jul 6, 2010
  4. @dancor
Commits on Jul 5, 2010
  1. @dancor

    preg_split("//", ..) -> str_split(..)

    Test Plan:
    preg_split("//", /*lol*/"AAAl\\.l\xffBBB");
    ->
    str_split(/*lol*/"AAAl\\.l\xffBBB");
    dancor committed Jul 5, 2010
  2. @dancor

    preg_split() -> explode() leave alone things like regex "/a/i"

    Test Plan: preg_split(".l\\\\\\.l\xff.i", "AAAl\\.l\xffBBB");
    dancor committed Jul 5, 2010
  3. @dancor

    transf non-regexes in preg_split() to explode()

    E.g. running kill-split then preg-split-non-regex could be useful.
    Note that string and regex parsing (into "units" like "a", "\n", "b")
    is a bit involved.  Note that there are interesting surprises, like if
    you use "." as your regex delimiter, you can never use a metacharacter
    "." in your regex pattern!
    
    Test Plan:
    ~ cat a.php
    <?php
    preg_split(".l\\\\\\.l\xff.", "AAAl\\.l\xffBBB");
    
    ~ lex-pass preg-split-non-regex
    Checking (1/1) a.php
    - Parsing
    - Saving
    
    ~ cat a.php
    <?php
    explode("l\\.l\xFF", "AAAl\\.l\xffBBB");
    
    ~ phpsh
    php> =preg_split(".l\\\\\\.l\xff.", "AAAl\\.l\xffBBB")
    array(
      0 => "AAA",
      1 => "BBB",
    )
    php> =explode("l\\.l\xFF", "AAAl\\.l\xffBBB");
    array(
      0 => "AAA",
      1 => "BBB",
    )
    dancor committed Jul 4, 2010
Commits on Jul 3, 2010
  1. @dancor

    kill-split: split() -> preg_split()

    Test Plan:
    ~ cat a.php
    <?php
    if (4 >= $a) {
      echo $lol;
    }
    if ($a === $b) {
      echo $lol;
    }
    split('l\\\\o/l', 'aaal\\o/lbbb');
    
    ~ lex-pass kill-split
    Checking (1/1) a.php
    - Parsing
    - Saving
    
    ~ cat a.php
    <?php
    if (4 >= $a) {
      echo $lol;
    }
    if ($a === $b) {
      echo $lol;
    }
    preg_split('/l\\\\o\/l/', 'aaal\\o/lbbb');
    
    ~ phpsh
    php> =split('l\\\\o/l', 'aaal\\o/lbbb')
    PHP Deprecated:  Function split() is deprecated in /usr/lib/python2.6/site-packages/phpsh/phpsh.php(534) : eval()'d code on line 1
    array(
      0 => "aaa",
      1 => "bbb",
    )
    php> =preg_split('/l\\\\o\/l/', 'aaal\\o/lbbb');
    array(
      0 => "aaa",
      1 => "bbb",
    )
    dancor committed Jul 3, 2010
  2. @dancor

    assignables-go-right for <, >, <=, >= too (refactored ~fdomig submiss…

    …ion)
    
    Test plan: $a >= 4 -> 4 <= $a
    dancor committed Jul 3, 2010
Commits on Jun 7, 2010
  1. @dancor
Commits on Jun 6, 2010
  1. @dancor

    assignables-go-right as first anti-pattern corrector

    also refactored AST to use new WSCap2 convenience type synonym
    
    ~/test/lex-pass/a> cat a.php
    <?php
    if ($a != 4) {
      echo $lol;
    }
    if ($a === $b) {
      echo $lol;
    }
    ~/test/lex-pass/a> lex-pass assignables-go-right
    Checking (1/1) a.php
    - Parsing
    - Saving
    ~/test/lex-pass/a> cat a.php
    <?php
    if (4 != $a) {
      echo $lol;
    }
    if ($a === $b) {
      echo $lol;
    }
    
    (should include these kinds of tests in lex-pass..)
    dancor committed Jun 6, 2010
Commits on Apr 11, 2010
  1. @dancor

    Either changes in FUtil

    dancor committed Apr 11, 2010
Commits on Mar 24, 2010
  1. ExprParse header simpler now

    Daniel Corson committed Mar 24, 2010
Commits on Mar 13, 2010
  1. rePairLeft and rePairRight in FUtil now

    Daniel Corson committed Mar 13, 2010
Commits on Mar 2, 2010
  1. actually fb index extension has tightest precedence, not weakest

    Summary: this will never matter to anyone.  but it's important to be
    correct.  to me.
    
    Reviewed By: epriestley
    
    Test Plan: id on all of tfb
    
    Revert Plan: ok
    Daniel Corson committed Mar 1, 2010
  2. support ($expr + $lol)['key'] etc fb extn to PHP

    Summary: ast change; requires a: ~ rm -r .ast
    
    Reviewers: schrockn
    
    Test Plan: id
    
    Revert Plan: ok
    
    DiffCamp Revision: 93701
    Daniel Corson committed Mar 1, 2010
Commits on Feb 23, 2010
  1. typo arwy -> awry

    Daniel Corson committed Feb 23, 2010
Commits on Feb 20, 2010
  1. StmtParse.hs/ExprParse.hs separate from Stmt.hs/ExprParse.hs

    Summary: i think it's cleaner this way.
    it might make sense to separate further to Parse and Unparse
    files, but i'm not sure.  and in the Future parsing technology should
    advance so that parsing and unparsing can be simultaneously specified
    anyway.  (it's redundant logic; unparsing should be derivable from
    parsing, though there may be some inherent speed hit in that..)
    
    Test Plan: compile
    
    Revert Plan: ok
    Daniel Corson committed Feb 19, 2010
Commits on Feb 17, 2010
  1. full help on erroneous usage

    Summary: we still haven't implemented -h/--help but maybe that's not
    needed now.
    
    Test Plan: lex-pass -h, lex-pass --lol
    
    Revert Plan: ok
    Daniel Corson committed Feb 16, 2010
  2. ignore leading ./ (or ././ etc) in file paths

    Summary: on more false errors with different kinds of find output etc.
    technically we could do more path normalization (i.e. a//b = a/b) but
    this is only thing of practical importance i would say.
    
    Test Plan: lex-pass id -s ././lib/lol.php, etc
    
    Revert Plan: ok
    Daniel Corson committed Feb 16, 2010
  3. instance Functor WSCap

    Summary: makes sense, saves typing
    
    Reviewed By: marcel
    
    Test Plan: func arg manipulations
    
    Revert Plan: ok
    Daniel Corson committed Feb 16, 2010
Commits on Feb 10, 2010
  1. xml-for-php explicit close tag correct handling; obscure error with &

    Summary: <a>..</> was becoming <a>..</a>
    
    Reviewed By: marcel
    
    Test Plan: id
    
    Revert Plan: ok
    Daniel Corson committed Feb 9, 2010
Commits on Feb 8, 2010
  1. looser treatment for xml-extended php; b'' todo

    Summary: was failing on the codebase
    
    Reviewed By: marcel
    
    Test Plan: id
    
    Revert Plan: ok
    Daniel Corson committed Feb 8, 2010
Commits on Nov 23, 2009
  1. StrLit "{$a[""]}" fix; f($a[]) fix

    Test Plan: run make-public-explicit
    Daniel Corson committed Nov 22, 2009
Commits on Nov 6, 2009
  1. options for multiple cores and ast caching

    Summary: investigating efficiency options; currently multiple cores
    and using tmpfs don't seem to make much difference.  ast caching saves
    40-50% of run time for normal transformations (parsing-isn't-as-
    expensive / transformations-are-more-expensive than i thought).  but i
    need to look more, and other ppl can too.  defaults are still same
    behavior before this change.
    
    Test Plan: running and timing with different settings/environments
    
    Revert Plan: ok
    Daniel Corson committed Nov 3, 2009
Commits on Oct 26, 2009
  1. get-all-defd-funcs

    Reviewed By: eletuchy
    
    Test Plan: ran it, got funcs both classy and not
    tens of thousands of them
    
    Revert Plan: ok
    Daniel Corson committed Oct 26, 2009
  2. Merge branch 'master' into defd-funcs

    Daniel Corson committed Oct 26, 2009
  3. support <tag>..</> form for <tag>..</tag> in xml

    Summary: marcel is going to start doing this
    
    Reviewed By: marcel
    
    Test Plan: compiles
    
    Revert Plan: ok
    Daniel Corson committed Oct 26, 2009
  4. defd funcs

    Daniel Corson committed Oct 26, 2009
Commits on Oct 25, 2009
  1. lex-pass rename-func/func-kill-arg transformers

    Summary: lex-pass is best for crazily heady transformations, but
    these down-to-earth changes are fine too.  and these ones are good
    and reusable examples for the public repo.
    
    Reviewed By: schrockn, eletuchy
    
    Test Plan: ran func-kill-arg on an fb task for schrockn with n=2 on
    func in hundreds of places with 1-3 args.  tested rename-func on
    that func as well.
    
    Revert Plan: ok
    Daniel Corson committed Oct 25, 2009
Commits on Oct 24, 2009
  1. support f()['key'] extension

    Summary: this is easy with our sweet breakdown of L and R Vals!
    
    Reviewed By: marcel
    
    Test Plan: lex-pass id
    
    Revert Plan: ok
    Daniel Corson committed Oct 24, 2009
  2. lexer, xml extension support, massive simplification and separation

    Summary: this will become lex-pass 2.1 prob after it's tested more
    
    Reviewed By: eletuchy
    
    Test Plan: lex-pass id on codebase
    
    Revert Plan: ok
    Daniel Corson committed Oct 24, 2009
Commits on Oct 21, 2009
  1. @dancor
Commits on Oct 9, 2009
  1. @dancor

    cp

    dancor committed Oct 8, 2009