Your #IDE spots errors before you even hit run. But HOW? Explore the hidden world of #StaticAnalysis — where grammars, parse trees & #ASTs rule. @martin_fmi breaks it all down. Read: https://javapro.io/2025/02/04/the-art-of-static-code-analysis/
Your #IDE spots errors before you even hit run. But HOW? Explore the hidden world of #StaticAnalysis — where grammars, parse trees & #ASTs rule. @martin_fmi breaks it all down. Read: https://javapro.io/2025/02/04/the-art-of-static-code-analysis/
Argh #antlr spielt gerade verrückt:
folgend
er Fehler:
line 2:32 mismatched input '*' expecting {'+', '-', '*'}
Die Regel ist:
startvariable: 'START' ( MUL | ADD | MINUS ); (wobei MUL, etc Tokens sind)
und ich will START * matchen , aber er tuts nicht...
Vor allem die Fehlermeldung treibt mich i n den Wahnsinn. Ja er erwartet ein '*' und kriegt ein '*' und will trotzdem nicht... Warum?
The #s390x open source software team at IBM confirms the latest versions of various software packages run well on #Linux on #IBMZ & #LinuxONE
In September of 2024 validation was maintained for over 40 projects, including #Antlr, #ApacheZeppelin & #TensorFlow
In the broader community, we saw s390x support added for memtrace, a Valgrind tool for tracing memory accesses (ci) & Chainsaw (ci, binaries) 🎉
Full report + how to get your own s390x VM for your project: https://community.ibm.com/community/user/ibmz-and-linuxone/blogs/elizabeth-k-joseph1/2024/10/29/linuxone-open-source-report-september-2024
Stellenausschreibung: Softwareentwickler/in bei der Germania Sacra in Göttingen, mehr Infos hier:
https://adw-goe.de/germania-sacra/news/news-details/stellenausschreibung-fuer-eine-vollzeitstelle-im-bereich-webentwicklung-digital-humanities/ #factgrid #wikibase #digitalhistory #antlr #RepertoriumGermanicum #DigitalHumanities
Как сделать анализатор кода за два дня
Статический анализ — это очень мощный инструмент, позволяющий следить за качеством кода. Предлагаю вместе попробовать написать простой Lua анализатор на Java, чтобы понять, как устроены статические анализаторы кода внутри.
https://habr.com/ru/companies/pvs-studio/articles/835936/
#PVSStudio #Lua #Java #antlr #antlr4 #статический_анализ #компиляторы #ast #утиная_типизация
Wish me luck. Going down the #antlr rabbit hole!
- Wears #programmersocks and #spinnyskirt
- #blahaj is my #rubberduck #programming buddy
- Obsessed with #refactoring #code #onthefly
- Loves #businessintegration #modularity #automation and #userexperience
- Loves #eventdriven design
- Knows what goes wrong when #cacheinvalidationstrikesagain
- Knows when to use #regex, when to use #xml, #html, and #json processing libraries, and when to use parser grammar engines like #antlr
- Loves #elegant code and #syntactic sugar
- Wants to use #problemsolving to #build a better world
- Knows #csharp #dotnet #LINQ #regex #vbnet #php #perl #sql and leaning #go #golang
- Listens to #nin #aphextwin #Ashnikko # but hasn't been able to get into #100gecs yet despite knowing why I should
- Wants to #getfedihired
So I'm building a thing that starts with a pom.xml in a Java repo, crawls that, it's local modules etc, to build the concept of a a collection of packages in a bigger project. It classifies each folder with a pom.xml as either a branch or a leaf and if it's a branch, queues up each subfolder for processing of the pom.xml. if it's a leaf, it walks SRC/Java/main and records the path of all the Java files for that package.
Sweet. That works well enough. Current problem is then to make a semantic analyser for Spring Boot annotations which I get from using a lexer and parser from antlr4 to read in each file and create an AST.
So this brings me to my current problem to solve, how to iterate through the items the parser has in its tree and create a parent / children object / struct to capture each @RestController and all the Uri paths, Params etc from that controller. Including class name etc.
Unsure how to structure that. Thinking a tree of somekind, but never done that before. Any ideas?
For context the ultimate goal here is a cli binary I can run in a repo that will output a map of every path a spring app will listen on and what Params etc it will accept. An authoritative expression of it's available attack surface and the class/filename that will first get any input sent in.
It will for a solid basis for other tools
I am also happy to know about any existing tools that do this. Analyser a spring boot codebase and produce a detailed (think swagger like) understanding of it's URIs etc.
Today I found out, that certain grammar rules in ANLTR4 can lead to unusable error messages.
Expressions are an important and extensive part of #SQL. We take a closer look at them. And at functions and how to support them with minimal effort. The fourth stage on the way to a complete island grammar with #ANTLR. How many more? See outlook. https://www.salvis.com/blog/2023/03/05/islandsql-episode-4-expressions/
Full grammar support for the lock table statement. Keeping other DML statements as single token. Ignoring everything else in #SQL scripts. The third stage on the way to a complete island grammar with #ANTLR.
https://www.salvis.com/blog/2023/02/19/islandsql-episode-3-lock-table/
Extracting all DML statements from #SQL scripts using #ANTLR. The second stage on the way to a complete grammar.
https://www.salvis.com/blog/2023/02/07/islandsql-episode-2-all-dml-statements/
This megatutorial about #ANTLR is pure gold. https://tomassetti.me/antlr-mega-tutorial/
The s390x open source team at IBM for #LinuxONE works to get the latest versions of open source software running for #Linux on IBM zSystems.
In October 2022 currency was maintained for over 20 projects! Including #Antlr #Falco & Strimziio Kafka operator & bridge https://community.ibm.com/community/user/ibmz-and-linuxone/blogs/elizabeth-k-joseph1/2022/11/30/linuxone-open-source-report-october-2022
Later I joined the team behind Xtext, a #Java based language engineering framework. This is about domain-specific (formal) languages, not natural language. You can write a grammar to specify the syntax and structure of your #DSL. Xtext uses the #ANTLR 3 parser and adds support for cross-references, indexing, editor support (completion, validation etc.) and much more. It supports Eclipse IDE and the Language Server Protocol (LSP), so it can also be used in #VSCode.