488 questions
Tooling
0
votes
2
replies
54
views
Rascal TypePal Language Server (even after packaging as VSIX) slow startup in VSCode – how to reduce initialization time?
I’ve built a custom language server using Rascal MPL’s parametric language server (util::LanguageServer) with TypePal for semantic analysis, and packaged it's .rsc dependencies in a jar as a VSCode ...
1
vote
0
answers
66
views
List comprehension issue when searching/comparing duplicates for >= 4 lines in list[str]
I am trying to identify duplicate blocks in a set of files. I read all lines from all files into one list[str] for analysis. A block consist of a number of consecutive lines. A variable named ...
1
vote
1
answer
70
views
parseJSON fails to parse json list
The parseJSON function fails to parse this fragment
"[{\"modelId\":\"\",\"oldSignature\":{\"val\":\"signature\"},\"newSignature\":{\&...
1
vote
1
answer
53
views
How to get the location of a node in a parse tree
It is a while ago that I used Rascal, so this may be a silly question.
How to get the location of a node in a parse tree?
For example, I would like to print the location of the condition of each if-...
1
vote
1
answer
88
views
Failing to write a summarizer
I'm trying to write a summarizer for my DSL in order to display error messages in the console.
I've been following the example with the Pico language and was able to successfully create a parser and ...
-1
votes
1
answer
68
views
How to check if a file is writable - without actually writing to it? [closed]
I have searched and read the IO module docs. I don't see any function like canWrite or isWritable (or the opposite). How can I determine whether a file is writable - without actually writing to it?
1
vote
0
answers
94
views
Preserving Whitespace in Rascal Pretty Printer for Interpolated Strings
So bascially, I'm trying to create a string literal that would support string interpolation without trimming out the whitespaces.
E.g. let x = s"hello ${foobar} world ".
The idea ...
0
votes
1
answer
46
views
Creating Code Property Graphs with Rascal-MPL
I'd like to be able to generate Code Property Graphs (CPG) from a Java codebase. I am new to Rascal MPL but from what I understand this is a good use case for it. Not been able to find any material ...
1
vote
1
answer
52
views
Using Rascal IMap in vallang library
I have been trying create and insert into map in Rascal via java, but I keep getting an empty map what am I doing wrong? There is no documentation on how to use this library, this will be very useful. ...
0
votes
1
answer
37
views
Creating customized scheme in rascal
How do I create a customized file scheme in RascalMPL, like so |somescheme:///|, I couldn't find any resource on how that can be done?
1
vote
2
answers
97
views
How do I call a Rascal function from Rust
I am working on a Rust CLI (using Clap) to use along side my Rascal DSL by problem is this. How do I call a Rascal function (functions defined my DSL) in my Rust CLI code? I have previously ...
0
votes
0
answers
40
views
Problem locations occurring after parsing C++ with Rascal and clair
I am parsing a list of cpp files using a simple Rascal script that uses the createM3AndAstFromCppFile function from the clair package to parse the C++ code and generate a M3 model. Unfortunately, in ...
1
vote
1
answer
56
views
Modifying a Tree at a specific location
I'm trying to modify a specific part of a tree at a given physical location. My approach was to extract the subtree using treeAt, modify it with a visit statement, and then update the original tree. ...
1
vote
1
answer
64
views
Handling ParseError in DSL using RascalMPL
In rascal, when my DSL has a parse error, how can I be able to detail what likely caused the syntax/parse error, since the ParseError exception just wraps the location of the issue in the file? Any ...
1
vote
1
answer
62
views
Ambiguity issues with 0.11.2 version of the vscode extension
Ever since I updated the vscode extension of rascal to version 0.11.2, I have been getting ambiguity warnings and errors when I try to test my syntax. I downgraded back to 0.11.1 and it works as it ...