You are browsing as a guest. Sign up (or log in) to start making projects!

kphoherz

@kphoherz

Joined June 8th, 2026

  • 3Devlogs
  • 1Projects
  • 0Ships
  • 0Votes
Open comments for this post

3h 6m 41s logged

I received my two Pico 2s today. I spent some time trying out examples and modifying them, and I managed to get the LED to blink, which was surprisingly difficult to find examples for because I needed it in Risc-V assembly. Then I worked on generating a tree from the parser I made in the last devblog. It seems to work well, but it is kind of hard to tell. Next I think I’ll either do semantic error checking, or skip right to the assembly generation and worry about the semantics later :)

0
0
19
Open comments for this post

3h 29m 34s logged

I worked on creating the Syntax analyzer for my Risc-V compiler. This stage checks the structure of the program and any grammatical errors. I had to do a lot of research on CFGs (Context free grammars). They define the rules for the language. Below is a spreadsheet of the CFG. I will improve it in the future to add more functions. I implemented an LL(1) parser. I was successfully able to check the grammar of a simple program. I still need to make the parser construct an abstract syntax tree. I realized that it is quite difficult to find pictures to post because it mostly happens in the console, but trust me, interesting things are happening!

0
0
3
Open comments for this post

2h 45m 58s logged

I have just started working on my first compiler. I have coded a couple of interpreters before, but this is my first time creating a compiler. I am designing it for the Pico 2 W and will be translating a modified C into Risc-V assembly. So far I have created the lexer which separates the source code into tokens. I have also set up a nice starting infrastructure including some error tracing. Below is the output of a test source code tokenized. Funnily enough, I’m running this compiler on a Pico as well. In the future, I hope to incorporate this compiler into a Pico based OS.

0
0
31

Followers

Loading…