busybox
grammars-v4
Our great sponsors
busybox | grammars-v4 | |
---|---|---|
6 | 29 | |
55 | 9,786 | |
- | 1.4% | |
0.0 | 9.6 | |
about 5 years ago | 3 days ago | |
C | ANTLR | |
GNU General Public License v3.0 or later | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
busybox
-
Sorry if this is too political.
Well.
- Guide: Hush Shell-Scripting Language
-
There's a tool to produce a diff-like output from c code?
Maybe you have better luck with the Busybox diff: https://github.com/brgl/busybox/blob/master/editors/diff.c
-
How could /dev/mem Linux directory be used in order to control the peripherals (MM/IO) ?
You can use busybox devmem to debug. The source code gives you an idea of how it works to write your own code.
-
Programming Puzzles
You can fairly easily spot things like recursive search tree implementations in the wild.
Also, compilers and interpreters often recursion, and that goes to as many levels as the program requires.
Have you heard of a "recursive descent parser"? GNU C++ uses one (a huge source file written in C++, well over a megabyte long). This will recurse as deeply as the program's nesting goes; C++ programs often go to more than three levels of nesting. (There are some non-recursive hacks mixed in there, like some operator precedence parsing involving an explicit stack: Shunting-Yard or similar?)
https://github.com/gcc-mirror/gcc/blob/master/gcc/cp/parser....
Let's switch over to embedded. Have you heard of BusyBox? BusyBox provides scaled down system utilities for embedded systems. It is very widely used.
BusyBox's "libb" internal library contains a function called "recursive_action" for walking file system trees. This is actually recursive, and frequently goes more than three levels deep in actual use:
https://github.com/brgl/busybox/blob/master/libbb/recursive_...
This is used by BusyBox programs like mdev (udev replacement) lsusb, lspci, chmod, ...
Also, HN isn't a good place to exhibit Lisp condescension/ignorance.
-
Go & secondary groups: a kaniko adventure!
This is almost the same implementation you see in busybox's id command source
grammars-v4
- Operadores de adição e subtração
-
Visual Basic for Applications Language Specification [pdf]
Perhaps the one from ANTLR's collection [0] is a good start (there are also others ANTLR VB6 grammars documented elsewhere). It does require knowing ANTLR, but that should be less effort for someone already familiar with language implementation, particularly, the visitor pattern (my favorite reference [1]).
[0] https://github.com/antlr/grammars-v4/tree/master/vb6
[1] https://craftinginterpreters.com/representing-code.html
-
Postgres Language Server: Implementing the Parser
Where is the SQLite test suite, please? I'd be very interested.
There are already SQL grammars, check https://github.com/antlr/grammars-v4 specifically in here I think https://github.com/antlr/grammars-v4/tree/master/sql I contributed to one of them, and I wrote my own for some personal work. Be warned, it's very involved, very complex and MSSQL is rather ill-defined.
Names bracket identifiers) in SQL are bloody awful. Sometimes square brackets are even compulsory, and why you can usually replace [...] with the SQL standard "..." , not always! Trust me, it gets worse.
I don't find antlr grammars to be brittle, and while they can lose in performance (by how much I don't know, perhaps quite considerably) they are very easy to maintain and I am very fortunate to have antlr to work with.
-
Llama: Add Grammar-Based Sampling
This grammar "library" was cited as an example of what the format could look like:.
https://github.com/antlr/grammars-v4
There is everything from assembly and C++ to glsl and scripting languages, arithmetic, games, and other weird formats.
-
Structured Output from LLMs (Without Reprompting!)
> Which brings me to the other approach: steering the LLM's output __as it is generating tokens__
A relevant PR:
https://github.com/ggerganov/llama.cpp/pull/1773
The plan is to support arbitrary grammar files to constrain tokens as they are generated, like the ones here:
https://github.com/antlr/grammars-v4
-
SQL-Parsing
Have a look at jooq - I know this has been used to rewrite SQL from one dialect to another, so it MUST be capable of collating code activity metrics. Look here. Otherwise, you might want to look into writing your own parser. ANTLR has a T-SQL dialect parser script here.
-
How should I prepare for AI-driven changes in the industry as a Software Engineering Manager
Find a Perl grammar file for ANTLR, like https://github.com/antlr/grammars-v4/tree/master/perl Save the grammar file as Perl.g4 in your project. Now, you can create the Kotlin program: import org.antlr.v4.runtime.* import org.antlr.v4.runtime.tree.ParseTree import java.io.File
- Can you create a cpp file in a program like you could a txt file?
-
DELD: An experimental HTTP-Client
Antlr is another option. You could generate a parser using the JSON antlr grammar.
- Are there any resources available to convert a code from Basic to C++? need to do this for the sake of an assignment. anything will be helpful
What are some alternatives?
barebox - The barebox bootloader - Mirror of ssh://[email protected]/barebox
ANTLR - ANTLR (ANother Tool for Language Recognition) is a powerful parser generator for reading, processing, executing, or translating structured text or binary files.
gcc
tree-sitter-sql - SQL grammar for tree-sitter
kaniko - Build Container Images In Kubernetes
lezer-snowsql
stshell
rewrite - Automated mass refactoring of source code.
hush - Hush is a unix shell based on the Lua programming language
tree-sitter-sql - SQL syntax highlighting for tree-sitter
hush - hush (a Bourne-style shell) for the GNO multitasking environment on the Apple IIgs
go-mysql-server - A MySQL-compatible relational database with a storage agnostic query engine. Implemented in pure Go.