Types, Prefix, Assignment & Grouping Expressions | Writing a Custom Language Parser in Golang

แชร์
ฝัง
  • เผยแพร่เมื่อ 23 พ.ย. 2024

ความคิดเห็น • 15

  • @kirillhorn3186
    @kirillhorn3186 7 หลายเดือนก่อน +5

    Thank you for this awesome series! We would definitely want videos about error handling and error tolerant parser.

  • @ygunayer
    @ygunayer 4 หลายเดือนก่อน +2

    This series is amazing, please keep them coming! Thanks a lot for creating this since pretty much all other content has people creating simple interpreters without building ASTs or not even mentioning Pratt parsing.
    And we of course would like error handling, especially to see an example of soft vs. hard errors and how the lexer/parser could continue processing after soft errors.

  • @DoubleDotStudio
    @DoubleDotStudio 7 หลายเดือนก่อน +2

    Yay! Next video is up. I've been looking forward to this. :)

  • @StregasGate
    @StregasGate 5 หลายเดือนก่อน

    This is awesome!
    Also video 5 isn't in the playlist yet and I just found it and now I'm excited 🎉

  • @smallcat2820
    @smallcat2820 3 หลายเดือนก่อน

    Hi, thanks for the series really like it! I am trying to follow it but using Haskell.
    Not criticism at all, I found some things that may be my mistakes or real bugs, so hoping it helps:
    1) The parse prefix, which @evertonelvio already mentioned it in a comment, so nothing to say.
    2) I think when parsing chains of binary expr that go frome more to less or equal it breaks or doesn't give the right tree. Not sure cause I fixed it in mine.. I think the first problem was that if it went from more to less then it just stopped parsing the Expr but didn't reach the SEMICOLON yet so error, and after I fixed that the problem was that if I did "2 * 5 + 3" it would give back a tree with the * as the Root and the + in a branch, which means it will do the addition before the multiplication (and I suppose it is not what is intended..).
    But anyways, thanks for the series and excited to continue following and doing my small project along the way!

  • @averydee5328
    @averydee5328 6 หลายเดือนก่อน +1

    Subbed

  • @evertonelvio
    @evertonelvio 3 หลายเดือนก่อน

    Hi!
    On the parse_prefix_expr, instead of calling parse_expr, should call only a parse NUD expr... because '-2 * 3' should be parsed a '-2' * '3' and not '-' '2*3'...

    • @smallcat2820
      @smallcat2820 3 หลายเดือนก่อน +1

      So that was it!
      I fixed it but probably doing something more complicated... ouch.
      Thanks!

    • @smallcat2820
      @smallcat2820 3 หลายเดือนก่อน

      Yup it seems to work as expected! Checked with both primary and grouping exprs. Thanks again!

  • @VladSaratovskyi
    @VladSaratovskyi 3 หลายเดือนก่อน

    led is runtime Expr but nun is compile time Expr?

    • @tylerlaceby
      @tylerlaceby  2 หลายเดือนก่อน +1

      This has nothing to do with runtime.
      LED means left denotation.
      NUD means null denotation.
      LED tokens are things which can only exist with something to the left of it. A good example is all binary operators.
      1 * 6 is a example.
      * Is LED as the left must first be parsed.
      NUD on the other hand means nothing is expected to the left.
      1 is a good example of this. To parse a numberExpr you don't need any other info to the left.
      A ! Token is another example of a NUD. ALL prefix tokens are NUD.

    • @VladSaratovskyi
      @VladSaratovskyi 2 หลายเดือนก่อน

      @@tylerlaceby ty, will read about it

  • @_slier
    @_slier 5 หลายเดือนก่อน

    what happened to this series? abandoned again?

    • @tylerlaceby
      @tylerlaceby  5 หลายเดือนก่อน +1

      I have been super busy. I will finish the series sometime.

    • @_slier
      @_slier 5 หลายเดือนก่อน

      @@tylerlaceby alrighty.. take ur time