| CODENOTIFIER | HelpYou are not signed inSign in |
Project: Jython
Revision: 5239
Author: fwierzbicki
Date: 23 Aug 2008 15:43:19
Changes:Fine tuning List and Assign col position.
Files:| ... | ...@@ -464,8 +464,8 @@ | |
| 464 | 464 | ) |
| 465 | 465 | |(testlist[null] ASSIGN) => lhs=testlist[expr_contextType.Store] |
| 466 | 466 | ( |
| 467 | | ((at=ASSIGN t+=testlist[expr_contextType.Store])+ -> ^(PYNODE<Assign>[$at, actions.makeAssignTargets((exprType)$lhs.tree, $t), actions.makeAssignValue($t)])) | |
| 468 | | ((ay=ASSIGN y2+=yield_expr)+ -> ^(PYNODE<Assign>[$ay, actions.makeAssignTargets((exprType)$lhs.tree, $y2), actions.makeAssignValue($y2)])) | |
| 467 | | ((at=ASSIGN t+=testlist[expr_contextType.Store])+ -> ^(PYNODE<Assign>[$lhs.start, actions.makeAssignTargets((exprType)$lhs.tree, $t), actions.makeAssignValue($t)])) | |
| 468 | | ((ay=ASSIGN y2+=yield_expr)+ -> ^(PYNODE<Assign>[$lhs.start, actions.makeAssignTargets((exprType)$lhs.tree, $y2), actions.makeAssignValue($y2)])) | |
| 469 | 469 | ) |
| 470 | 470 | | lhs=testlist[expr_contextType.Load] -> PYNODE<Expr>[$lhs.start, (exprType)$lhs.tree] |
| 471 | 471 | ) |
| ... | ...@@ -1022,7 +1022,7 @@ | |
| 1022 | 1022 | ) |
| 1023 | 1023 | RPAREN |
| 1024 | 1024 | | LBRACK |
| 1025 | (listmaker -> listmaker | |
| 1025 | (listmaker[$LBRACK] -> listmaker | |
| 1026 | 1026 | | -> ^(LBRACK<org.python.antlr.ast.List>[$LBRACK, new exprType[0\], $expr::ctype]) |
| 1027 | 1027 | ) |
| 1028 | 1028 | RBRACK |
| ... | ...@@ -1042,7 +1042,7 @@ | |
| 1042 | 1042 | ; |
| 1043 | 1043 | |
| 1044 | 1044 | //listmaker: test ( list_for | (',' test)* [','] ) |
| 1045 | listmaker | |
| 1045 | listmaker[Token lbrack] | |
| 1046 | 1046 | @init { |
| 1047 | 1047 | List gens = new ArrayList(); |
| 1048 | 1048 | exprType etype = null; |
| ... | ...@@ -1054,10 +1054,10 @@ | |
| 1054 | 1054 | ( list_for[gens] { |
| 1055 | 1055 | Collections.reverse(gens); |
| 1056 | 1056 | comprehensionType[] c = (comprehensionType[])gens.toArray(new comprehensionType[gens.size()]); |
| 1057 | etype = new ListComp($listmaker.start, (exprType)$t.get(0), c); | |
| 1057 | etype = new ListComp($lbrack, (exprType)$t.get(0), c); | |
| 1058 | 1058 | } |
| 1059 | 1059 | | (options {greedy=true;}:COMMA t+=test[expr_contextType.Load])* { |
| 1060 | etype = new org.python.antlr.ast.List($listmaker.start, actions.makeExprs($t), $expr::ctype); | |
| 1060 | etype = new org.python.antlr.ast.List($lbrack, actions.makeExprs($t), $expr::ctype); | |
| 1061 | 1061 | } |
| 1062 | 1062 | ) (COMMA)? |
| 1063 | 1063 | ; |
| ... | ...@@ -318,9 +318,7 @@ | |
| 318 | 318 | change to grammar files. If you are working on the grammars you might |
| 319 | 319 | want to comment this out, as a clean is really only needed if you change |
| 320 | 320 | the tokens defined in Python.g (and cleans make the build slow) --> |
| 321 | <antcall target="clean"/> | |
| 322 | 321 | <!-- force jarjar build --> |
| 323 | <property name="jarjar.needed" value="true" /> | |
| 324 | 322 | </target> |
| 325 | 323 | |
| 326 | 324 | <target name ="prepare-output" depends="init,needed-check,clean-if-antlr-needed,make-output-dirs"/> |