about summary refs log tree commit diff
path: root/src/libexpr/parser.y
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2005-07-25T15·05+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2005-07-25T15·05+0000
commit991a130b1e71b3b849b3640264f8834d6e13da22 (patch)
tree1e99a52b73043814fa501c8d470a933d2bc7cded /src/libexpr/parser.y
parente6899794ae9ce3924b818721d5caff463bccd60c (diff)
* Added a list concatenation operator:
    [1 2 3] ++ [4 5 6] => [1 2 3 4 5 6]

Diffstat (limited to 'src/libexpr/parser.y')
-rw-r--r--src/libexpr/parser.y2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libexpr/parser.y b/src/libexpr/parser.y
index 1f204a228009..23f1965ecd64 100644
--- a/src/libexpr/parser.y
+++ b/src/libexpr/parser.y
@@ -64,6 +64,7 @@ static Pos makeCurPos(YYLTYPE * loc, void * data)
 %right UPDATE
 %left NEG
 %left '+'
+%left CONCAT
 %nonassoc '?'
 %nonassoc '~'
 
@@ -102,6 +103,7 @@ expr_op
   | expr_op '~' expr_op { $$ = makeSubPath($1, $3); }
   | expr_op '?' ID { $$ = makeOpHasAttr($1, $3); }
   | expr_op '+' expr_op { $$ = makeOpPlus($1, $3); }
+  | expr_op CONCAT expr_op { $$ = makeOpConcat($1, $3); }
   | expr_app
   ;