-
-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failures parsing General registry #134
Comments
Couple of issues which might be bugs in the reference parser:
|
Related to the |
Thanks yes the float literal bug is pretty weird. I tried to understand how this happens a while back. IIRC it was a combination of (a) a bug in the reference lexer allowing extra sufficies and (b) reusing the flisp reader for numeric literals which does allow We had a call about the issues mentioned in #134 (comment) and decided they're bugs. It's a little unclear what to do about the string processing issue. But clear that the existing behavior is weird. |
@oscardssmith I've found a weird disagreement when parsing the float constant I think the following indicate this literal gets incorrectly rounded in the reference parser: julia> abs(big"17.328679084777833" - JuliaSyntax.parse(Expr, "17.328679084777833f0")) <
abs(big"17.328679084777833" - JuliaSyntax.fl_parse("17.328679084777833f0"))
true
julia> x = JuliaSyntax.fl_parse("17.328679084777833f0")
17.328678f0
# looks like the error is roughly 1/2 ulps of a Float64
julia> abs(big"17.328679084777833" - x) - abs(big"17.328679084777833" - nextfloat(x))
1.937500000000000000000000000000000000000000000000000000000000163954795499142396e-15 |
what's fl_parse? |
|
this isn't great. can you make a Julialang issue to track it? |
I chatted to @JeffBezanson about a couple more of these issues today. We thought that
|
Here's a list of failures when parsing General restricted to cases where
Expr
s mismatchParser failures
A[x ? y : end]
- AssociativeArrays_0.0.3/src/namedaxis.jl, Reduce_1.2.12/src/Reduce.jl, UnROOT_0.8.1/src/UnROOT.jlfunction (f()) where T end
- DMRJtensor_0.8.7/lib/Qtensor.jl, DMRJtensor_0.8.7/lib/decompositions.jl, EnglishText_0.6.0/src/numeric.jl, ExprTools_0.1.8/test/function.jl, MemoryMutate_0.0.4/src/MemoryMutate.jl, MultivariatePolynomials_0.4.2/src/differentiation.jl, Singular_0.9.1/src/module/vector.jl, etc why people why??.1..0.1
- DomainSets_0.5.9/test/test_setoperations.jl,0x01..0xcf
- Rasters_0.2.0/test/sources/gdal.jlimport Base.:*
- Empirikos_0.4.5/src/ebayes_targets.jl,import A.:⋅
- MeasureTheory_0.13.2/test/runtests.jl, Pathnames_0.1.0/src/Pathnames.jl, Porta_0.1.4/src/geometry/biquaternions.jlBase.(:*)
- UnitfulLatexify_1.5.2/src/UnitfulLatexify.jlfunction ($M).$J() end
- Knet_1.4.9/src/cuarrays/reduction.jl@a@b
- MathematicalSystems_0.11.11/test/@system.jl[a~b]
- ModelingToolkitStandardLibrary_0.1.0/test/test_continuous.jl, NeuralPDE_4.4.0/test/NNPDE_tests.jl, etc@(A)
- NumericalMethodsforEngineers_2.0.0/examples/ch07/WRM/Fig.7.14.jl-1.#comment
- POMDPModels_0.4.15/src/MountainCar.jlA.@a(x).b
- WorkerUtilities_1.0.1/test/runtests.jl(1+2).@x
- julia_1.6.1/test/show.jlParses, but Expr is wrong
@.r
- no space after macro name@\ _
- symbol macro names"[1 2\n]"
- hvcat rather than hcatA where {X, Y; Z}
- parameters not in first args slot@a(x; a)
- parameters not in first args slottry a end
should be an errorfunction (f::T{g(i)})() end
andfunction (::g(x))() end
.&(x)
+0xff
f(x for a = as, b = bs for c = cs, d = ds)
x ≂ y ≂ z
A[x, y; z = 1]
- parameter block=
vskw
"\"\"\"\n\$x\n b\"\"\""
- wrong deindentationusing A: @.
- not lowered to@__dot__
A{x;y,z}
andA{x;y,z=1}
- parameter blocks & kw vs =function (:*=(f))() end
- NiLang uses thisBizarre forms which parse differently but unclear if it's worth fixing
function (begin end) nothing end
ExprTools_0.1.8/test/function.jlExpr conversion failures
Bugs in reference parser
export @A @B
should not parse - TSML_2.7.2/src/TSML.jl17.328679084777833f0
is not correctly rounded?1.0e+
parses as anInt128
literalf()isa(x,y)
is not the juxtaposed multiplicationf()*isa(x,y)
. It's infixisa
syntax instead.[i; for i in is]
is allowed by the reference parser but the presence of this semicolon is weird and broken.The following bugs we can deal with when comparing Exprs
0x1.8p23f
is aFloat64
literal, with the trailingf
ignored (also0x1p1f0
)"@f(a=1) do\nend"
is not the same as the call in@f(a=1)
global (x,y)
is the same asglobal x,y
in reference parser"\"\"\"\n a\n \n b\"\"\""
parses to"a\n \nb"
in reference parser - lines with partial whitespace are handled inconsistently(a; b,)
- should be a frankentuple not a block. Occurs a single time in QuadraticFormsMGHyp_0.5.1/src/QuadraticFormsMGHyp.jl and appears to be a syntax mistake."\"\"\"\n \$y\n \n \"\"\"\n"
- partial whitespace"f(g() = x)"
- extra blockIntentional failures due to being stricter than reference parser
import A as (a.b)
- julia_1.6.1/test/syntax.jl"str"for i=is end
The text was updated successfully, but these errors were encountered: