Skip to main content

All Questions

Filter by
Sorted by
Tagged with
2 votes
1 answer
227 views

Commented Parser Combinators in Lisp-style C

I've attempted to remedy the issues outlined in the answer to my previous question. I've added several hundred blank lines to better illustrate the grouping of functions and generally make things look ...
luser droog's user avatar
  • 2,138
2 votes
1 answer
166 views

Parser Combinators in C redux

A few more rewrites down the line from my previous question, this is the C version 11 based on the PostScript prototype version 12. The PostScript version is shorter, but it's some crazy ass ...
luser droog's user avatar
  • 2,138
2 votes
3 answers
175 views

Finds Keywords in Log Files

This is my first project in C and I wanted a more experienced person's insight on how I made the whole program. Just looking for feedback it works how I want it to. The Github is here. Thank you so ...
cobb208's user avatar
  • 21
4 votes
3 answers
2k views

Split function using C and dynamic memory allocation

I have programmed a function to split strings, and it gives the expected output. I am looking forward to write better code and I was told here is a good place to start. Here's my program: ...
Majd's user avatar
  • 141
1 vote
2 answers
139 views

A function to scan user input as string

I know that multiple functions are already available. However, I thought of writing my own because I wanted to learn the logic (and also because I thought there wasn't enough confusion :P). Please ...
kesarling's user avatar
  • 352
-1 votes
1 answer
372 views

Interlock of some equipments in electrical power system using simple Arduino Uno code [closed]

I'm trying to implement some logic functions essential to control a small power system consisting of 2 Transformers labeled T1 and T2, 2 Generators (G1 and G2) and a bus tie (BT). I'm not going to ...
A. Ali's user avatar
  • 1
4 votes
2 answers
102 views

User defined function call on a stack based interpreter for concatenative language

I would like to receive some advice on how to improve a small concatenative stack-based interpreter, executing a joy-like programming language. It is really minimal, and is in fact a subset of a ...
Foxy's user avatar
  • 143
10 votes
1 answer
556 views

Lazy, Functional Parser Combinators

Parser Combinators are the amazingly elegant way to write parsers that has evolved over on the functional programming side of the world, but have been less available or accessible for imperative ...
luser droog's user avatar
  • 2,138
2 votes
1 answer
332 views

Parser Combinators in OO C

In trying to understand and use the Parser Combinator concept, I've coded up as close an analogue as I could manage within the constraints of the C language. C doesn't have first-class functions or ...
luser droog's user avatar
  • 2,138
1 vote
1 answer
141 views

Prime factorization - C

After learning prime factorization today, below is the C code written, ...
overexchange's user avatar
  • 3,401
8 votes
2 answers
335 views

Compiler for a minimal LISP dialect to run on the Java Virtual Machine

As the title states, this is a compiler written in C with a ruby build script that translates a minimal LISP dialect and spits out an executable jar file. I designed this LISP dialect and named it ...
user avatar
3 votes
2 answers
179 views

Functional-style linked list written in C

For my Operating Systems class, I needed a linked list data structure and didn't have one already written. During the course of thinking about how to implement a linked list again (it had been a while....
itsjareds's user avatar