Skip to content
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

SomSom - A Metacircular SOM #11

Merged
merged 4 commits into from
Apr 11, 2021
Merged

SomSom - A Metacircular SOM #11

merged 4 commits into from
Apr 11, 2021

Conversation

smarr
Copy link
Member

@smarr smarr commented Mar 17, 2020

This PR updates the core-lib with SomSom and adapts the command-line parameter handling to allow SomSom to see options.
It also sets up CI, and a few benchmarks.

PR History

This is in support of the SomSom lexer (SOM-st/SOM#29) and implements the new primitives for the String class.
The semantics for isWhiteSpace, isLetter, isDigit as identical to what is needed in the parser. Thus, it should be trivial to implement by simply exposing the already existing implementation.

Two further errors are not handled:

  • failure to resolve super class does now cause a ParseError, which results in a more useful error message
  • empty primitives now send Object>>#error: (see Invalid primitives SOM#27)

@ltratt this might be relevant for you as well

@sophie-kaleba could you please review this?

@ltratt
Copy link

ltratt commented Mar 17, 2020

Dumb question: can these not be implemented as SOM-level functions rather than primitives?

@smarr
Copy link
Member Author

smarr commented Mar 17, 2020

Well, I don't really want to take care of unicode support. So, I think, here the answer is for practical reasons: not really.

And, realistically, the parser/lexer has exactly this functionality already anyway, so, seems somewhat redundant to implement it again.

@ltratt
Copy link

ltratt commented Mar 17, 2020

Well, I don't really want to take care of unicode support.

Point taken.

@smarr smarr changed the title New String primitives: isWhiteSpace, isLetter, isDigit, and send #error: from empty primitive SomSom - A Metacircular SOM Mar 18, 2020
@smarr smarr force-pushed the som-som branch 2 times, most recently from 67eb6fa to e32a6cb Compare March 26, 2020 14:10
@smarr smarr force-pushed the som-som branch 5 times, most recently from fc63acb to 834b25a Compare April 11, 2021 10:53
@smarr smarr merged commit 22e6067 into SOM-st:master Apr 11, 2021
@smarr smarr deleted the som-som branch April 11, 2021 16:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants