Permalink
Switch branches/tags
Nothing to show
Commits on May 14, 2012
  1. fix issues with unicode input

    tdudziak committed May 14, 2012
  2. update to use parsec-3

    tdudziak committed May 14, 2012
Commits on Jul 6, 2010
  1. normedStrUnitIsRegexUnmetaEvenEscaped was never needed

    dancor committed Jul 6, 2010
    never ended up using this; realized alphanumeric-ness was the key
  2. for php regex, an escaped char is meta iff the char is alphanumeric

    dancor committed Jul 6, 2010
    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);
Commits on Jul 5, 2010
  1. preg_split("//", ..) -> str_split(..)

    dancor committed Jul 5, 2010
    Test Plan:
    preg_split("//", /*lol*/"AAAl\\.l\xffBBB");
    ->
    str_split(/*lol*/"AAAl\\.l\xffBBB");
  2. preg_split() -> explode() leave alone things like regex "/a/i"

    dancor committed Jul 5, 2010
    Test Plan: preg_split(".l\\\\\\.l\xff.i", "AAAl\\.l\xffBBB");
  3. transf non-regexes in preg_split() to explode()

    dancor committed Jul 5, 2010
    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",
    )
Commits on Jul 3, 2010
  1. kill-split: split() -> preg_split()

    dancor committed Jul 3, 2010
    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",
    )
  2. assignables-go-right for <, >, <=, >= too (refactored ~fdomig submiss…

    dancor committed Jul 3, 2010
    …ion)
    
    Test plan: $a >= 4 -> 4 <= $a
Commits on Jun 7, 2010
Commits on Jun 6, 2010
  1. assignables-go-right as first anti-pattern corrector

    dancor committed Jun 6, 2010
    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..)
Commits on Apr 11, 2010
  1. 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

    Daniel Corson committed Mar 2, 2010
    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
  2. support ($expr + $lol)['key'] etc fb extn to PHP

    Daniel Corson committed Mar 2, 2010
    Summary: ast change; requires a: ~ rm -r .ast
    
    Reviewers: schrockn
    
    Test Plan: id
    
    Revert Plan: ok
    
    DiffCamp Revision: 93701
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

    Daniel Corson committed Feb 20, 2010
    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
Commits on Feb 17, 2010
  1. full help on erroneous usage

    Daniel Corson committed Feb 17, 2010
    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
  2. ignore leading ./ (or ././ etc) in file paths

    Daniel Corson committed Feb 17, 2010
    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
  3. instance Functor WSCap

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

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

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

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

    Daniel Corson committed Nov 4, 2009
    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
Commits on Oct 26, 2009
  1. get-all-defd-funcs

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

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

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

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

    Daniel Corson committed Oct 25, 2009
    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
Commits on Oct 24, 2009
  1. support f()['key'] extension

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

    Daniel Corson committed Oct 24, 2009
    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