Skip to content

Commit 951d565

Browse files
ajwheelerKristofferC
authored andcommitted
Update the developer docs to reflect the use of JuliaSyntax.jl (#59300)
[The "parsing" section of the "eval" dev docs page](https://docs.julialang.org/en/v1/devdocs/eval/#dev-parsing) was not updated when JuliaSyntax.jl was adopted in 1.10. This updates the text to reflect that it is the default parser and briefly mentions how to switch back. (cherry picked from commit ec27274)
1 parent 03b53d3 commit 951d565

File tree

1 file changed

+5
-19
lines changed

1 file changed

+5
-19
lines changed

doc/src/devdocs/eval.md

Lines changed: 5 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -62,25 +62,11 @@ The 10,000 foot view of the whole process is as follows:
6262

6363
## [Parsing](@id dev-parsing)
6464

65-
The Julia parser is a small lisp program written in femtolisp, the source-code for which is distributed
66-
inside Julia in [src/flisp](https://github.com/JuliaLang/julia/tree/master/src/flisp).
67-
68-
The interface functions for this are primarily defined in [`jlfrontend.scm`](https://github.com/JuliaLang/julia/blob/master/src/jlfrontend.scm).
69-
The code in [`ast.c`](https://github.com/JuliaLang/julia/blob/master/src/ast.c) handles this handoff
70-
on the Julia side.
71-
72-
The other relevant files at this stage are [`julia-parser.scm`](https://github.com/JuliaLang/julia/blob/master/src/julia-parser.scm),
73-
which handles tokenizing Julia code and turning it into an AST, and [`julia-syntax.scm`](https://github.com/JuliaLang/julia/blob/master/src/julia-syntax.scm),
74-
which handles transforming complex AST representations into simpler, "lowered" AST representations
75-
which are more suitable for analysis and execution.
76-
77-
If you want to test the parser without re-building Julia in its entirety, you can run the frontend
78-
on its own as follows:
79-
80-
$ cd src
81-
$ flisp/flisp
82-
> (load "jlfrontend.scm")
83-
> (jl-parse-file "<filename>")
65+
By default, Julia uses [JuliaSyntax.jl](https://github.com/JuliaLang/JuliaSyntax.jl) to produce the
66+
AST. Historically, it used a small lisp program written in femtolisp, the source-code for which is
67+
distributed inside Julia in [src/flisp](https://github.com/JuliaLang/julia/tree/master/src/flisp).
68+
If the `JULIA_USE_FLISP_PARSER` environment variable is set to `1`, the old parser will be used
69+
instead.
8470

8571
## [Macro Expansion](@id dev-macro-expansion)
8672

0 commit comments

Comments
 (0)