Making a parser with ansi-c

I already posted in r/C_Programming but also I am sharing with you because you have much more experience than there.

So I'm making a parser who written in ansi-c for understanding how compilers work and I'm keep updating this project. Here: Github (Project doesn't have a readme section)

I will convert this project to programming language. (But a basic one) So if you have time please check my project and leave a feedback. Thank you for your interest and concern :)

πŸ‘︎ 14
πŸ’¬︎
πŸ‘€︎ u/SteryNomo
πŸ“…︎ Jan 09 2022
🚨︎ report
How did ANSI-C control CPU registers

Dating back to early '90 nearly all OS kernels were implemented in c89/90 a.k.a. ANSI-C. How did ANSI-C control CPU registers at that time without inline or asm()?

πŸ‘︎ 31
πŸ’¬︎
πŸ‘€︎ u/ptkrisada
πŸ“…︎ Dec 17 2021
🚨︎ report
exploring weird tunings in ANSI C youtu.be/rxx8eflIn4Q
πŸ‘︎ 8
πŸ’¬︎
πŸ‘€︎ u/athlaknaka
πŸ“…︎ Jan 04 2022
🚨︎ report
Making a parser with ansi-c (Part 2)

Helo again, I decided to make a parser for understand how compilers work. 2 weeks ago I posted part-1 of this project and I'm keep updating this project. Here: Part-1

After part-1 I was thinking about this project and I decided to make a programming language who written in ansi-c. So, I will do like python because of my code style. Here is the project: Github

Features:

  • Memory leaks and bugs fixed.
  • Now parser much more faster.
  • Error handling added. (And keep updating)
  • Basic math operations. (Only one digit numbers)
  • Variable system. (In one file parser can keep only 128 variable)
  • Live command section. (Only testing commands)

Current Fails:

  • What will happend if user put multiple space to the end? (parser.c:113)
  • Last line doesn't work but if last line was empty, it finely work! (parser.c:53)
  • Variable system has data limits.

Feature Goals:

  • Project will be programming language.
  1. Find a name to project.
  2. Make it work with a extension name.
  3. Prepare a guide for new users.
  4. Make a demo with this project.
  • Condition statement system.
  • Loop system.
  • More command.

If you have a suggestion for me or my project please leave a comment. If you have an issue about my project please leave a feedback to comments or to github. Thank you for your interest and concern :)

πŸ‘︎ 9
πŸ’¬︎
πŸ‘€︎ u/SteryNomo
πŸ“…︎ Jan 09 2022
🚨︎ report
Making a parser with ansi-c

I started to make a beginner level parser for learning about memory management and how does parsers work. So I made this: https://github.com/hanilr/parser-acc

I will keep update this project because I'm so deteminated for this project. But is parser have to compile to c source code and then execute or just need to give rigth pieces? Because I just did programmed parser to execute specific functions.

πŸ‘︎ 6
πŸ’¬︎
πŸ‘€︎ u/SteryNomo
πŸ“…︎ Dec 25 2021
🚨︎ report
Problems with ANSI C, Code Runner and the C/C++ Extension /r/learnprogramming/comme…
πŸ‘︎ 9
πŸ’¬︎
πŸ“…︎ Dec 28 2021
🚨︎ report
[US-CA][H] Chiwi60 White w/ Brass Plate and custom brass bottom/PC bottom with hotswap CannonKeys AN-C ANSI | x87 L+F Everglide Dark Jades/Moyu Black switches [W] PayPal

Timestamp

Shipping via USPS first class, will provide tracking number. Prices include shipping (unless stated) and in USD

Item Asking Price Status
Chiwi60 with Custom Brass Plate and PC bottom/Brass bottom, Durock V2 lubed and tuned stabs, UpgradeKeyboard stab pads, AN-C ANSI PCB, soldered on mill-max 7305 $400 (price does not include shipping, brass is heavy)
x87 Everglide Dark Jades (Moyu Black) L+F. Spring swapped BUT included original springs, swapped with alpaca v2 springs, Lubed Tribosys 3204 and black Deskeys Films, Springs Krytox 105g0 $130 Sold 120
πŸ‘︎ 3
πŸ’¬︎
πŸ‘€︎ u/CharaiABC
πŸ“…︎ Dec 20 2021
🚨︎ report
ANSI C, Tuning experiments, Equal Temperament variations youtu.be/rxx8eflIn4Q
πŸ‘︎ 2
πŸ’¬︎
πŸ‘€︎ u/athlaknaka
πŸ“…︎ Jan 04 2022
🚨︎ report
ANSI C lib for logs

Hi, I made a little lib in c for logs, so I would like to share it πŸ˜‹.

What did you think of it ?

logger.c

Other useful lib with the same mind set are coming

πŸ‘︎ 6
πŸ’¬︎
πŸ‘€︎ u/DanteGarza
πŸ“…︎ Nov 24 2021
🚨︎ report
Count Decimal Places in Ansi C?

Hello everyone,

I am trying to count decimal places in Ansi C, but I'm not sure how to do it.

The program should print out the sum of 2 float numbers. If the result has 2 decimal places then it should only print out the number with 2 decimal places. If it has 3 then 3 places and so on.

How can I count how many decimal places the float number has?
Thank you in advance!

πŸ‘︎ 3
πŸ’¬︎
πŸ‘€︎ u/Simanetik
πŸ“…︎ Nov 25 2021
🚨︎ report
SDK for cross-platform desktop applications in ANSI-C (OpenSource - MIT) nappgui.com
πŸ‘︎ 13
πŸ’¬︎
πŸ‘€︎ u/frang75
πŸ“…︎ Sep 09 2021
🚨︎ report
Object oriented programming with ANSI C

Is this the best source for learning about object oriented C? Coming from c++ it’s just strange and wanting to find something that goes into more detail on what is going on.

πŸ‘︎ 5
πŸ’¬︎
πŸ‘€︎ u/perryplatt
πŸ“…︎ Sep 01 2021
🚨︎ report
eli5: Difference between gnu c and ansi c

Thanks in advance!

πŸ‘︎ 16
πŸ’¬︎
πŸ‘€︎ u/segment_fault930
πŸ“…︎ Aug 31 2021
🚨︎ report
Ansi c complier

Hello everyone Δ± am a very beginner programmer and i am looking for complier for ansi c for free I downloaded devc++ it works for c but ansi c Do you have any recomendation Thx in advance

πŸ‘︎ 8
πŸ’¬︎
πŸ‘€︎ u/3quark
πŸ“…︎ Aug 23 2021
🚨︎ report
ACSL (ANSI C Specification Language) - Frama-C frama-c.com/html/acsl.htm…
πŸ‘︎ 9
πŸ’¬︎
πŸ‘€︎ u/yawaramin
πŸ“…︎ Aug 01 2021
🚨︎ report
xv6 is a re-implementation Unix Version 6, implemented for a modern RISC-V multiprocessor using ANSI C, created for MIT's operating systems course github.com/mit-pdos/xv6-r…
πŸ‘︎ 48
πŸ’¬︎
πŸ‘€︎ u/wolfgang
πŸ“…︎ Apr 12 2021
🚨︎ report
ANSI C allows for up to 12 levels of pointers. Why would you ever use more than 3 or 4 levels?

In my experience as a C programmer, I've only ever used single, double, and triple pointers. I understand that if you needed say a 10th dimension Rubik's cube you might wanna use a dectuple pointer or similar but I feel like that's cheating. I also understand it usually makes a lot of sense to use a structure that contains pointers for various applications. I haven't really seen this question answered generally so I figured it was worth asking here. Why on Earth would someone use a 4th, 5th, 6th, ..., 12th level pointer? Is there any reasonable reason for ANSI C to include 12 levels? Thanks!

πŸ‘︎ 115
πŸ’¬︎
πŸ‘€︎ u/doowi1
πŸ“…︎ Jan 22 2021
🚨︎ report
[US-GA] [H] Polycarbonate TGR Police/Alice [W] OG Cherry ANSI dyesubs, RAMA M6-C RWxRW or M6-C in Kuro colorway, Artisans (GAF, KBK/KWK, Clacks, Booper), Paypal

BOARD IS SOLD!

TIMESTAMPS!

Hey mechmarket dwellers!

I am looking to sell my TGR Police to help cover costs for some other purchases made.

Here is what is included:

TGR Police (Alice) Polycarbonate

  • Copper Weight and Plate
  • TGR Purple PCB (desoldered)
  • TGR Carrying Case
  • Additional build: TGR Brass Plate + Mechlovin' Adelais en Ciel PCB (per key RGB) built with 205g0-lubed Holy GSUS/Panda switches (BSUN housing + Halo True stems - housings are not from Drop), 65g Sprit springs lubed with 104 oil, and GMK stabs lubed with 205g0
    • Brass plate has some patina present and a few light scratches near right spacebar
  • Additional photos here: https://imgur.com/a/gfDySdz
  • Price = $4200 shipped in CONUS

Please do not send messages via chat and comment below before sending a private message. Thanks!

πŸ‘︎ 12
πŸ’¬︎
πŸ‘€︎ u/AG_spektrum
πŸ“…︎ May 14 2021
🚨︎ report
Automation Studio - Referencing ANSI C Libraries

I'm having an issue getting AS to build references to a 3rd party dynamic C lib.

I inherited a handful of projects all coded in C on the B&R platform. The included image shows how each routine should look - however, I cannot get any of my routines to identify these dependencies. The "Append Dependency" option is grayed out, perhaps I am missing something here.

Since thorough documentation on ANSI C in AS4 seems really light, I'm asking here - anyone know how to get dependencies to show up here, and/or where to find good documentation for the AS4 implementation of C?

https://preview.redd.it/uc9ycsymw2171.png?width=334&format=png&auto=webp&s=04a4203f387e38b7822bc1ee2402deb46f0a094a

πŸ‘︎ 3
πŸ’¬︎
πŸ‘€︎ u/phatboysh
πŸ“…︎ May 24 2021
🚨︎ report
I made a compact library for generic intrusive data structures in ANSI C github.com/MichaelJWelsh/…
πŸ‘︎ 18
πŸ’¬︎
πŸ‘€︎ u/Mike_TriHard_Cx
πŸ“…︎ May 03 2021
🚨︎ report
When to mix ANSI C types and stdint.h types?

First off, I'm not sure I'm defining the question correctly.

By ANSCI C types, I mean the traditional char, int, long, etc. And by stdint.h types I mean the respective int8_t,int32_t, and int64_t counterparts.

I like the clarity that the stdint.h types provide and think they help readability, brevity and intention. For example, I know that no matter the architecture, 'uint32_t' is an unsigned 32-bit integer, and 'uint64_t' is an unsigned 64-bit integer, etc. versus 'unsigned int' and 'unsigned long long'; and then there's the fact that I might actually need 'unsigned long' for 32-bits on some architectures when I declare 'unsigned int'. On the other hand, some types seem simpler to just define as 'int' if I don't really need to specify that it should be 32 bit or 64 bit and know that the architecture is going to assign it a bitspace well within its expected range; function return types really stand out to me in this regard.

Then there's things like 'char' versus 'uint8_t'. I feel like, if I want to deal with binary data, and 8-bit bytes, that 'uint8_t' makes sense. However, if I want to deal with ASCII characters, shouldn't I use 'char'? What's more is that some standard library functions seem to not like when you use 'uint8_t' versus 'char', especially those in strings.h. So while a 'uint8_t' type might technically be the same as a 'char' type, 'char' seems to be more readable and specific in letting me know I'm dealing with ASCII string data.

So is it okay to mix the two, or should you just use one or the other? For example, if I'm going to use 'uint8_t' to define a data buffer that will contain binary data in 8-bit bytes, should I also define my strings that way instead of 'char' even though they're character strings? And should I define every counter or return variable with the type that provids the bitspace I think it needs (uint8_t vs uint16_t vs uint32_t etc) or is it fine to use a simple 'int' for these, while defining a data buffer that I know expects 4-byte or 8-byte integers with uint32_t and uint64_t respectively?

Anyway I don't know if this is all a matter of preference and style, or if there are any standard conventions, but I'm curious what people here think.

πŸ‘︎ 8
πŸ’¬︎
πŸ‘€︎ u/kennbr
πŸ“…︎ Feb 13 2021
🚨︎ report
I made a compact library for generic intrusive data structures in ANSI C github.com/MichaelJWelsh/…
πŸ‘︎ 13
πŸ’¬︎
πŸ‘€︎ u/Mike_TriHard_Cx
πŸ“…︎ May 03 2021
🚨︎ report
[US-GA] [H] Think6.5 v2 (2u) Deep Ocean + extras, Silver UTD 360c (built) w/ FEMO connector, Rukia R1.5 Kit [W] RAMA M6-C RWxRW or M6-C in Kuro colorway, OG Cherry ANSI dyesubs, Artisan Trades, Paypal

ALL ITEMS HAVE BEEN SOLD!

Think6.5 v2 (2u version) in the Deep Ocean colorway - BNIB https://imgur.com/a/ePG0w2x

  • Brass Nautical badge + brass weight (currently installed); original black lightbulb badge and blue weight are included, 2x solder PCBs + 2x FR4 plates. 3x gasket packs (1 comes with the board + 2 extra packs) & 1x extra set of feet, 1x aluminum "Cat Think" artisan in black, and Original boxes, tools, and accessories
  • PRICE = $975 shipped SOLD

Polycarbonate Rukia R1.5 with sandblasted brass weight https://imgur.com/a/W3jn6jv

  • Includes 1x brass plate, 1x Mechlovin' FR4 plate, and 1x BNIB Mechlovin' PCB
  • Brass weight has tarnish and was attempted to be cleaned by previous owner. I've left it alone since owning, as I prefer the tarnished look. USB cutout has to be shaved to support different PCBs (known issue with R1.5). Additional photos includes close-up of this area. Not visible with PCB installed.
  • PRICE = $900 shipped SOLD

UTD 360c WKL TKL - Silver colorway - Complete Build https://imgur.com/a/2EAB69b/

  • Board is built with retooled Cherry blacks filmed & lubed with 205g0 + 65g springs and GMK stabs lubed with 205g0
  • Upgraded USB cable to paracord w/ black techflex and fake LEMO connector. Also including a USB-C cable connector to use host cable with other boards
  • Received the board with 2 tiny defects on back-right corner and front-left corner that is not noticeable in use. Detailed pics in album
  • PRICE = $450 shipped SOLD

Please do not send messages via chat and comment below before sending a private message. Thanks!

πŸ‘︎ 4
πŸ’¬︎
πŸ‘€︎ u/AG_spektrum
πŸ“…︎ Apr 04 2021
🚨︎ report
Simple MySQL ORM for C is a Python script, that connects to the existing MySQL database, fetches all the table's structures and generates according structures and functions for ANSI C language. ales.jikos.cz/smorm/
πŸ‘︎ 2
πŸ’¬︎
πŸ‘€︎ u/pdp10
πŸ“…︎ Jun 15 2021
🚨︎ report
[US-UT] [H] Paypal [W] DZ60 USB C ANSI PCB, 60% Plate

Looking to find just a DZ60 USB C ANSI PCB and a plate. I don’t mind if it’s solder or not swap or what not.

Comment PM and then PM please

Cheers.

πŸ‘︎ 2
πŸ’¬︎
πŸ‘€︎ u/iiimrgiii
πŸ“…︎ Feb 24 2021
🚨︎ report
[US-OR] [H] Built E-White Tofu60 w/ Zealios v2 62g, MiTo XDA Godspeed Keycap Kit, Black Poker 2 60%, Tai-Hao Vintage Keycaps, KBD 60% ANSI Brass Plate, KBDFans Custom Coiled USB C Cable [W] PayPal

Timestamp

Looking to downsize my current collection to clear some space. Please feel free to PM me if you have any questions or require additional photos. Willing to bundle multiple at a lower price. Cheers!

KBD E-White Tofu60 Fully built on a DZ60RGB v2 Hotswap PCB, Zealios v2 62g lubed alphas w/ 205g0, Durock v2 Stabs lubed w/ 205g0, Brass KBD plate. Bought case from another Redditor. Does not include keycaps. $260 USD shipped Sold for asking to u/greenpouch
MiTo XDA Godspeed Keycaps Only selling as a bundle. Includes Solar Alphas, Apollo Base Text, GodX kit. Well taken care of, little to no shine present. $120 USD shipped
Poker 2 Black 60% Well used and well loved. First mechanical keyboard I owned. Cherry MX Brown switches non-backlit version. Original packaging, keycaps, and additional color modifiers. Comes with original keycap puller, two USB C cables (braided and normal). Original keycaps are near new because I have always used different keycap sets on it. $40 USD shipped
Tai Hao 104 Key ABS Doubleshot Backlit set Vintage Dark Grey/white/red/blue, used, minimal signs of wear $20 USD shipped
KBD Brass ANSI Plate Never mounted or used. I bought the wrong plate when building the mentioned Tofu60. $40 USD shipped
KBDFans Handmade Custom USB C Coiled Cable Black w/ small white stripes aviator connection. Can be found on KBDFans. Used for only a week. $45 USD shipped Sold bundled to u/greenpouch
πŸ‘︎ 3
πŸ’¬︎
πŸ‘€︎ u/light_switch
πŸ“…︎ Feb 02 2021
🚨︎ report
I made a compact library for generic intrusive data structures in ANSI C github.com/MichaelJWelsh/…
πŸ‘︎ 25
πŸ’¬︎
πŸ‘€︎ u/Mike_TriHard_Cx
πŸ“…︎ May 03 2021
🚨︎ report
Does anybody program their cRIO's in ANSI C? I'm getting super agro with this whole visual programming thing.

My background is text based languages such as python and java, and PLC ladder logic. What would normally take me 3 seconds and zero thought is taking me 2 days to get done in labview. I can't even figure out how to get a freaking digital output to turn on and off continuously within a while loop.

I'm not going to give up on the visual programming, mainly because I'm stubborn and have to get good at everything I do. But does anyone here program exclusively in C? I'm starting to feel like it might be quicker for me to just do that

πŸ‘︎ 2
πŸ’¬︎
πŸ‘€︎ u/dipsy01
πŸ“…︎ Dec 30 2020
🚨︎ report
I made a compact library for generic intrusive data structures in ANSI C github.com/MichaelJWelsh/…
πŸ‘︎ 9
πŸ’¬︎
πŸ‘€︎ u/Mike_TriHard_Cx
πŸ“…︎ May 03 2021
🚨︎ report
Adding ANSI C11 C compiler to D so it can import and compile C files directly github.com/dlang/dmd/pull…
πŸ‘︎ 3
πŸ’¬︎
πŸ‘€︎ u/qznc_bot2
πŸ“…︎ May 10 2021
🚨︎ report
A compact library for generic intrusive data structures in ANSI C github.com/MichaelJWelsh/…
πŸ‘︎ 4
πŸ’¬︎
πŸ‘€︎ u/pdp10
πŸ“…︎ May 04 2021
🚨︎ report
Peppa PEG v1.10.0 released (Ultra-lightweight PEG Parser in ANSI C) github.com/soasme/PeppaPE…
πŸ‘︎ 7
πŸ’¬︎
πŸ‘€︎ u/soasme
πŸ“…︎ Apr 10 2021
🚨︎ report
[US-CA][H] Chiwi60 White w/ Brass Plate and custom brass bottom/PC bottom with CannonKeys AN-C ANSI + Millmax hotswap 7305sockets, x87 L+F Everglide Dark Jades/Moyu Black switches 3204 deskeys films [W] PayPal for keeb, switch trades for L+F Silent Alpaca, Gazzew switches

Timestamp

Shipping via USPS first class, will provide tracking number. Prices include shipping and in USD

Item Asking Price Status
Chiwi60 with Custom Brass Plate and PC bottom/Brass bottom, Durock V2 lubed and tuned stabs, UpgradeKeyboard stab pads, AN-C ANSI PCB, soldered on mill-max 7305 $400 (price includes shipping, brass is heavy)
x87 Everglide Dark Jades (Moyu Black) L+F. Spring swapped BUT included original springs, swapped with alpaca v2 springs, Lubed Tribosys 3204 and black Deskeys Films, Springs Krytox 105g0 $130 OR trade for L+F 205g0 Silent Alpacas OR L+F 205g0 Gazzew U4T 62g; ideally with KBDfans or Deskeys films
πŸ‘︎ 2
πŸ’¬︎
πŸ‘€︎ u/CharaiABC
πŸ“…︎ Aug 09 2021
🚨︎ report
[US-CA][H] Chiwi60 White w/ Brass Plate and custom brass bottom/PC bottom option with CannonKeys AN-C ANSI + soldered on Millmax hotswap 7305sockets, x87 L+F Everglide Dark Jades/Moyu Black switches 3204 deskeys films [W] PayPal for keeb, switch trades for L+F Silent Alpaca, Gazzew switches

Timestamp

Shipping via USPS first class, will provide tracking number. Prices include shipping and in USD

Item Asking Price Status
Chiwi60 with Custom Brass Plate and PC bottom/Brass bottom, Durock V2 lubed and tuned stabs, UpgradeKeyboard stab pads, AN-C ANSI PCB, soldered on mill-max 7305 $400 (price includes shipping, brass is heavy)
x87 Everglide Dark Jades (Moyu Black) L+F. Spring swapped BUT included original springs, swapped with alpaca v2 springs, Lubed Tribosys 3204 and black Deskeys Films, Springs Krytox 105g0 $130 OR trade for L+F 205g0 Silent Alpacas OR L+F 205g0 Gazzew U4T 62g; ideally with KBDfans or Deskeys films
πŸ‘︎ 2
πŸ’¬︎
πŸ‘€︎ u/CharaiABC
πŸ“…︎ Jul 31 2021
🚨︎ report

Please note that this site uses cookies to personalise content and adverts, to provide social media features, and to analyse web traffic. Click here for more information.