Git Product home page Git Product logo

Comments (1)

pfitzseb avatar pfitzseb commented on June 27, 2024

Turns out this works fine in JuliaSyntax (e.g. with JuliaSyntax.parseall(Expr,join(('0' for _ in 1:5043000), ','));). CSTParser is a bit more recursive and fails here for me:

julia> CSTParser.parse(repeat("0,",1043000));
ERROR: StackOverflowError:
Stacktrace:
  [1] optakessuffix
    @ Tokenize.Lexers ~/.julia/packages/Tokenize/JHBGP/src/utilities.jl:220 [inlined]
  [2] emit(l::Tokenize.Lexers.Lexer{IOBuffer, Tokenize.Tokens.RawToken}, kind::Tokenize.Tokens.Kind, err::Tokenize.Tokens.TokenError)
    @ Tokenize.Lexers ~/.julia/packages/Tokenize/JHBGP/src/lexer.jl:278
  [3] emit
    @ Tokenize.Lexers ~/.julia/packages/Tokenize/JHBGP/src/lexer.jl:277 [inlined]
  [4] lex_digit(l::Tokenize.Lexers.Lexer{IOBuffer, Tokenize.Tokens.RawToken}, kind::Tokenize.Tokens.Kind)
    @ Tokenize.Lexers ~/.julia/packages/Tokenize/JHBGP/src/lexer.jl:729
  [5] next_token(l::Tokenize.Lexers.Lexer{IOBuffer, Tokenize.Tokens.RawToken}, start::Bool)
    @ Tokenize.Lexers ~/.julia/packages/Tokenize/JHBGP/src/lexer.jl:390
  [6] next_token
    @ Tokenize.Lexers ~/.julia/packages/Tokenize/JHBGP/src/lexer.jl:315 [inlined]
  [7] next(ps::ParseState)
    @ CSTParser ~/Documents/Git/julia-vscode/scripts/packages/CSTParser/src/lexer.jl:102
  [8] parse_expression(ps::ParseState, esc_on_error::Bool)
    @ CSTParser ~/Documents/Git/julia-vscode/scripts/packages/CSTParser/src/packagedef.jl:48
  [9] parse_expression(ps::ParseState)
    @ CSTParser ~/Documents/Git/julia-vscode/scripts/packages/CSTParser/src/packagedef.jl:37
 [10] macro expansion
    @ CSTParser ~/Documents/Git/julia-vscode/scripts/packages/CSTParser/src/utils.jl:63 [inlined]
 [11] parse_tuple(ps::ParseState, ret::CSTParser.EXPR)
    @ CSTParser ~/Documents/Git/julia-vscode/scripts/packages/CSTParser/src/components/lists.jl:23
 [12] parse_compound(ps::ParseState, ret::CSTParser.EXPR)
    @ CSTParser ~/Documents/Git/julia-vscode/scripts/packages/CSTParser/src/packagedef.jl:135
 [13] parse_compound_recur(ps::ParseState, ret::CSTParser.EXPR) (repeats 79976 times)
    @ CSTParser ~/Documents/Git/julia-vscode/scripts/packages/CSTParser/src/packagedef.jl:92
    ```

from languageserver.jl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.