[Snek] [keith-packard/snek] f8c88c: Clean up snek-lex.c references in snek.h

Keith Packard noreply at github.com
Thu May 30 09:07:59 PDT 2019


  Branch: refs/heads/master
  Home:   https://github.com/keith-packard/snek
  Commit: f8c88cc9a19837bb128c43a6ce2666e3ef672def
      https://github.com/keith-packard/snek/commit/f8c88cc9a19837bb128c43a6ce2666e3ef672def
  Author: Keith Packard <keithp at keithp.com>
  Date:   2019-05-30 (Thu, 30 May 2019)

  Changed paths:
    M snek.h

  Log Message:
  -----------
  Clean up snek-lex.c references in snek.h

These were split into snek-lex.l and snek-lex.c sections

Signed-off-by: Keith Packard <keithp at keithp.com>


  Commit: 46898724e43d92b3accb3cfa5f3364c5fc02eef3
      https://github.com/keith-packard/snek/commit/46898724e43d92b3accb3cfa5f3364c5fc02eef3
  Author: Keith Packard <keithp at keithp.com>
  Date:   2019-05-30 (Thu, 30 May 2019)

  Changed paths:
    M snek-lex.c
    M snek-parse.c
    M snek.h

  Log Message:
  -----------
  Clean up parse/lex state variable declarations

Rearrange to clarify which varaiables need to be reset during error
recovery.

Signed-off-by: Keith Packard <keithp at keithp.com>


  Commit: e7ef9e4669a70dfc7ea40a6c8b4bba90b9d34e27
      https://github.com/keith-packard/snek/commit/e7ef9e4669a70dfc7ea40a6c8b4bba90b9d34e27
  Author: Keith Packard <keithp at keithp.com>
  Date:   2019-05-30 (Thu, 30 May 2019)

  Changed paths:
    M snek-lex.c

  Log Message:
  -----------
  Share snek_ignore_nl underflow checks

Avoid duplicating code in all three places using this pattern.

Signed-off-by: Keith Packard <keithp at keithp.com>


  Commit: 56be54730df71a017262fb63349d5e857e01421e
      https://github.com/keith-packard/snek/commit/56be54730df71a017262fb63349d5e857e01421e
  Author: Keith Packard <keithp at keithp.com>
  Date:   2019-05-30 (Thu, 30 May 2019)

  Changed paths:
    M snek-code.c
    M snek-parse.c
    M snek.h

  Log Message:
  -----------
  Reset parser more completely after errors

Clear up lexer and code gen state too.

Signed-off-by: Keith Packard <keithp at keithp.com>


  Commit: 67556441326b306a626674535e4acf9acb3c17d4
      https://github.com/keith-packard/snek/commit/67556441326b306a626674535e4acf9acb3c17d4
  Author: Keith Packard <keithp at keithp.com>
  Date:   2019-05-30 (Thu, 30 May 2019)

  Changed paths:
    M ports/posix/snek-main.c

  Log Message:
  -----------
  posix: Add '--file' option

This reads a file before entering the command line loop to allow
pre-loading of code, much like the embedded ports

Signed-off-by: Keith Packard <keithp at keithp.com>


  Commit: 319cae7a0dc414f6581583ccb4cbf83d4cbca8fd
      https://github.com/keith-packard/snek/commit/319cae7a0dc414f6581583ccb4cbf83d4cbca8fd
  Author: Keith Packard <keithp at keithp.com>
  Date:   2019-05-30 (Thu, 30 May 2019)

  Changed paths:
    M chips/atmega/snek-atmega-eeprom.c
    M chips/avr/snek-avr-eeprom.c
    M chips/samd21/snek-eeprom.c

  Log Message:
  -----------
  chips/avr, chips/atmega, chips/samd21: Return EOF after finishing EEPROM

This causes the parser to return, which will cause it to completely
reset the parse state, cleaning up after indentation or any potential
errors in the EEPROM.

Signed-off-by: Keith Packard <keithp at keithp.com>


Compare: https://github.com/keith-packard/snek/compare/ca601a5aa260...319cae7a0dc4


More information about the Snek mailing list