Skip to main content
0 votes
2 answers
79 views

I am trying to build a mapping between the dynamic symbols in ELF files (from glibc) and the actual kernel syscalls they invoke. My environment is x86_64 Ubuntu 22.04. What I've Tried Parsing man 2 ...
신경철's user avatar
0 votes
1 answer
83 views

I'm writing a program that will update a Rust project's imports to be from their new locations after a breaking change in a library. In this instance, I'd like to flatten all imports from vexide::...
lewisfm's user avatar
1 vote
0 answers
26 views

I am having difficulty figuring out the best way to conditionally create nodes using javacc and jjtree. In my grammar there are literals, variables, operators and functions. Variables can have the ...
opeongo's user avatar
  • 474
1 vote
1 answer
67 views

Why do I get different result when using a Find directly on a ScriptBlock AST (Abstract Syntax Tree) or when using the Parser: $ScriptBlock = { function Write-Hello { Param ($name) ...
iRon's user avatar
  • 24.4k
1 vote
1 answer
88 views

Let's say I want to define a potentially infinite list of computation as a data type. So that the computation could be fun a -> a' = Just a' || fun (a -> a') || fun (a -> b) &...
xiaolingxiao's user avatar
  • 4,937
0 votes
0 answers
61 views

I have a simple Angular app: import { Component } from '@angular/core'; import { bootstrapApplication } from '@angular/platform-browser'; @Component({ selector: 'app-root', template: ` <...
Jon's user avatar
  • 464
2 votes
0 answers
44 views

I want to parse some ast.CompositeLit nodes and do some reordering of the fields instantiated in a struct. So, for example, imagine that I have the following struct: _ = Person{ // the name Name: &...
Manuelarte's user avatar
  • 1,904
2 votes
2 answers
74 views

I'm trying to match switch statements that operate on enum types defined in certain header files. I'm running clang-query on source that looks like the following: enum class E { ONE, TWO }; ...
Curious's user avatar
  • 21.3k
0 votes
0 answers
54 views

Iam trying to unMarshal AST json to ast.Module structure of OPA. policy.rego: package example.authz import rego.v1 allow if { some i input.users[i].role == "admin" } use command ...
user27911082's user avatar
0 votes
1 answer
140 views

I am writting an annotation processor as a Proof Of Concept (implemented as a maven project). It detects classes annotated with my custom @FunnyBooleans which swaps all trues to falses and vice versa. ...
Alkis Mavridis's user avatar
2 votes
1 answer
94 views

With writing custom PSSA rules and just parsing PowerShell scripts, I find myself often in the same use case where I would like to resolve command name (which is not that difficult) and the parameters ...
iRon's user avatar
  • 24.4k
2 votes
0 answers
145 views

I am working with a situation in which I need to turn an arithmetic string expression (e.g. (3/2) * (3**4 / (20 * 4))**(-1/4)) into the following prime factorization form: $\prod_{p:\text{prime}}p_i^{...
F. X. P.'s user avatar
  • 145
1 vote
1 answer
124 views

I'm using ast-grep to detect patterns in Java files, but the files and ignores filter configuration isn't working as expected. According to the documentation, we can apply pattern matching to specific ...
bazzinga's user avatar
0 votes
1 answer
107 views

I am trying to create a (PowerShell based) PSScriptAnalyzer rule that does basically the opposite of the native usebomforunicodeencodedfile rule knowing that we do not allow any Unicode characters in ...
iRon's user avatar
  • 24.4k
0 votes
0 answers
36 views

Here is the output run on a very simple urls.py from a test Django project: from django.contrib import admin from django.urls import path urlpatterns = [\ path('test_path1/', views.test_view1, ...
Luna's Chalkboard's user avatar

15 30 50 per page
1
2 3 4 5
204