Monday, April 29, 2024
2
rated 0 times [  2] [ 0]  / answers: 1 / hits: 2979  / 2 Years ago, wed, december 1, 2021, 11:07:42

I'm trying to get a better understanding of the *.dsl files as disassembled by the iasl program. Those files looks like:



/*
* a comment
*/
Stuff
{
More Stuff
{
Beer (a, b) // another comment
}
Hmm (mmm)
{
Package (0x04)
{
0xFFFF
},

Package (0x04)
{
0xFFFF
}
}
Meh (x, y)
}


This syntax should be really easy for a text viewer / editor. Since I'm just viewing these files, the editing feature is not needed. The file has 11k lines which makes it more difficult to scan for text.



Is there a lightweight text viewer with folding capabilities? Both CLI and GUI solutions are welcome.



Addition: I would like to have the next features too:




  • shortcuts to jump from the child to the parent (e.g. Beer to More Stuff or the { next to it)

  • quick search (till now, I used less in which I can search by pressing / followed by the search term and Enter. The Firefox "on the bottom search" bar is something that I would like to see for a GUI program)

  • bonus: hiding blocks of text



The purpose of the viewer is getting me through the text file faster.


More From » software-recommendation

 Answers
5

For my particular needs (analysing ACPI tables), I've created FoldedViewer:




view.html



It's name is actually FoldedViewer (no trademark infrignment intended if any) and the JS/ HTML5 program is useful for speeding up analys of DSDT/ SSDT tables by providing folding capabilities. If you're using a recent browser, especially if it's open-source like Firefox or Chromium, you'll be able to select files through a file picker.




Features:




  • Fold blocks (determined by indention, Ctrl + Click)

  • Show the number of childs blocks

  • Jump to line number

  • Save the fold state in the browser using localStorage

  • Works from browser, no installation required

  • Opens file from URL or using the file picker of the browser

  • Shows the namespace and object of the block under the mouse position

  • Highlights the current line and selected block

  • Collapse/ expand all blocks with a single Ctrl + Shift + Click



screenshot of FoldedViewer


[#44011] Wednesday, December 1, 2021, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
bjecterless

Total Points: 59
Total Questions: 96
Total Answers: 105

Location: Argentina
Member since Thu, Mar 18, 2021
3 Years ago
bjecterless questions
;