# Parsing of multiple \`..\`

**URL:** https://discourse.julialang.org/t/parsing-of-multiple/121843
**Category:** General Usage
**Tags:** question, parsing
**Created:** [October 27, 2024, 10:39pm UTC](https://discourse.julialang.org/t/parsing-of-multiple/121843 "2024-10-27T22:39:35Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![CameronBieganek](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cameronbieganek/32/6915_2.png) [@CameronBieganek](https://discourse.julialang.org/u/CameronBieganek)
#### Post date: [October 27, 2024, 10:39pm UTC](https://discourse.julialang.org/t/parsing-of-multiple/121843/1 "2024-10-27T22:39:35Z")

</div>

Why does this parse,

```julia-repl
julia> :(a .. b)
:(a .. b)

```

but this does not,

```julia-repl
julia> :(a .. b .. c)
ERROR: ParseError:
# Error @ REPL[31]:1:10
:(a .. b .. c)
# └──┘ ── Expected `)`

```

?

---

<div class="post-metadata">

### Author: ![ufechner7](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ufechner7/32/51363_2.png) [@ufechner7](https://discourse.julialang.org/u/ufechner7)
#### Post date: [October 27, 2024, 11:08pm UTC](https://discourse.julialang.org/t/parsing-of-multiple/121843/2 "2024-10-27T23:08:41Z")

</div>

What is `..` supposed to be, from your point of view?

---

<div class="post-metadata">

### Author: ![CameronBieganek](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cameronbieganek/32/6915_2.png) [@CameronBieganek](https://discourse.julialang.org/u/CameronBieganek)
#### Post date: [October 27, 2024, 11:17pm UTC](https://discourse.julialang.org/t/parsing-of-multiple/121843/3 "2024-10-27T23:17:14Z")

</div>

It’s just a binary operator that I might overload, and it would be nice if it parsed like most binary operators.

---

<div class="post-metadata">

### Author: ![ufechner7](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ufechner7/32/51363_2.png) [@ufechner7](https://discourse.julialang.org/u/ufechner7)
#### Post date: [October 27, 2024, 11:20pm UTC](https://discourse.julialang.org/t/parsing-of-multiple/121843/4 "2024-10-27T23:20:33Z")

</div>

`julia> .. ERROR: UndefVarError: `..` not defined`  
How do you come to the conclusion that it is a binary operator?

---

<div class="post-metadata">

### Author: ![DanielVandH](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/danielvandh/32/31134_2.png) [@DanielVandH](https://discourse.julialang.org/u/DanielVandH)
#### Post date: [October 27, 2024, 11:21pm UTC](https://discourse.julialang.org/t/parsing-of-multiple/121843/5 "2024-10-27T23:21:15Z")

</div>

```julia
julia> ..(a, b) = a + b
.. (generic function with 1 method)

julia> 2 .. 3
5

```

It’s used plenty. e.g. IntervalSets

---

<div class="post-metadata">

### Author: ![stevengj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stevengj/32/71_2.png) [@stevengj](https://discourse.julialang.org/u/stevengj)
#### Post date: [October 27, 2024, 11:24pm UTC](https://discourse.julialang.org/t/parsing-of-multiple/121843/6 "2024-10-27T23:24:17Z")

</div>

I think it’s because `..` is parsed with the same precedence as `:`, but `:` is parsed strangely for multiple arguments, and probably the special-casing messes up `..`.

Seems like it should be fixed.

---

<div class="post-metadata">

### Author: ![giordano](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/giordano/32/2166_2.png) [@giordano](https://discourse.julialang.org/u/giordano)
#### Post date: [October 27, 2024, 11:43pm UTC](https://discourse.julialang.org/t/parsing-of-multiple/121843/7 "2024-10-27T23:43:21Z")

</div>

> **[Mathematical Operations and Elementary Functions · The Julia Language](https://docs.julialang.org/en/v1/manual/mathematical-operations/#Operator-Precedence-and-Associativity)**
>
> Documentation for The Julia Language.
