Oberon | Oberon parser , code model
kandi X-RAY | Oberon Summary
kandi X-RAY | Oberon Summary
This project started out as an Oberon-07 parser, code model and transpiler written in C++ and Qt, with the goal to build tools to better understand the Lola-2 compiler and to automatically translate it to maintainable C++ with minimal dependencies to other C++ libraries, and with no dependencies to the Oberon System (see the Lola and LolaCreator repositories). Oberon turned out to be a language very well suited for compiler front and backend experiments because it is decently simple but still powerful enough to build real-world software, as it supports pointers, static and stack based data structures and call by reference, which are not usually available with scripting languages. In consequence, an other goal of this project is to study the feasibility of reusing LuaJIT as a backend for statically typed programming languages like Oberon (see this article). The current implementation of the compiler is able to map full Oberon+ to LuaJIT, CIL/ECMA-335 bytecode and C99 source code, and run with decent performance (see Linux report and Windows report). There is also a compatible version of the Oberon System, as well as a powerful IDE with semantic navigation and source-level debugging (see below). During my work with Oberon and systems implemented in Oberon, I kept asking myself what properties the language would need to have so that I could use it for my own systems too, without giving up the goal of making it as simple as possible. From these considerations a new language emerged, which I call Oberon+ (i.e. "Oberon with extensions", abbreviated OBX); it is a general-purpose, procedural and object-oriented programming language in the tradition of and based on Oberon-07, Oberon-2 and Oberon 90, with all the elements of these languages, plus generic modules, enumerations, and many additional simplifications such as support for lower case keywords, optional semicolons, and flexible declaration sequences. See the language report and the dedicated language site for more information. The compiler supports both, Oberon+ as well as most of the syntax and semantics of the previous Oberon versions. For representative examples of Oberon+ see the Are-we-fast-yet benchmark suite migrated to Oberon+. It also demonstrates generic programming with collections and iterators.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of Oberon
Oberon Key Features
Oberon Examples and Code Snippets
Community Discussions
Trending Discussions on Oberon
QUESTION
An imperative programmer for a long time, every so often I look back in on Haskell and play a little more and learn a little more.
A question arose when thinking about a possible project:
How to implement data that I explicitly want to change in a language that treats data as immutable?
A specific case is the text that is edited by a text editor. Data.Text is available but it says things like appending a character to the end of a text involves copying the entire text over. Because of things like that, I'm wondering if Data.Text is the appropriate structure to use to implement text who's purpose is to change.
Is there a generalized thinking that addresses this sort of thing?
Over the years, I've written two implementations of text machinery in C#. One used a linked list of blocks of 256 (or 512, I forget, it's been a while) characters, similar to what's described in the Sam text editor. The other is a slightly modified version of a design done by Niklaus Wirth (who got it from someone else) in the Oberon System where text is implemented by two files (one for the original text, the other for newly entered data) and a linked list of pieces that is used to assemble and edit the text. I used two .NET StringBuilders instead of files, only append to them, and the whole things performs much better that just using StringBuilders as the text itself.
Note: I have a reasonable working knowledge of laziness, strictness, tail-recursion, thunks. Fusion is less clear to me but I've read a little on it.
I have a good bit of experience with SQL so I don't have a problem with a compiler doing things I don't fully understand, but in that language I know how to conceptualize the problem better than I do in Hasell.
...ANSWER
Answered 2021-Dec-17 at 00:12The standard reference for editor implementation in Haskell is probably the Yi editor. Its author(s) wrote some papers discussing this, e.g.:
Like many text editors, Yi uses a rope as the representation of text buffers. Specifically, it’s a purely functional rope called Yi.Rope.YiString
containing chunks of Text
, defined as a specialisation of Data.FingerTree.FingerTree
, the same data structure underlying Data.Sequence.Seq
. There are further optimisations such as caching of indices into the text and batching of operations on the buffer, but the core is just a persistent tree of Unicode text chunks.
Using a persistent data structure incurs a logarithmic time cost, but makes certain features (such as cached history and incremental computation) simpler to implement correctly.
QUESTION
I'm currently using Oxford Oberon-2 compiler but it doesn't seem to support the XYplane module, which makes it kind of difficult to follow the examples from Wirth's book about the language.
...ANSWER
Answered 2021-Jul-06 at 09:53Unless you need type-bound procedures, you could try OBNC which implements Niklaus Wirth's revision of the original Oberon language:
https://www.miasap.se/obnc/oberon-report.html
See also
QUESTION
I am learning Mulesoft 4 and trying to run a filter on a list of books. In the Transform message, there are no errors and in the preview, the books are filtered by price as expected.
When I run the request in my REST client, I get the following 500 Server Error error. When I remove the filter, I get a successful post in REST. I set a breakpoint on the Transform component and got the error below. How can I fix this?
Detailed error description
...ANSWER
Answered 2021-Mar-28 at 00:46Updating the answer with the screenshot from Studio:
Script within a Mule app in studio:
Result of the execution of the DW script, for the payload mentioned in the Assumed Input section
===============================================================
I am assuming your input payload looks something like below as if i leave the filter outside i can reproduce the error that you get, attributing to the datatype of the book [].
Assumed Input:
QUESTION
I am very much a beginner at using XSLT and I have only recently begun learning it. I am having trouble with trying to print a certain value to display in HTML format based on the XML file below. Essentially I want the HTML page created by the XSL file to display all of the book ID's from only the Fantasy genre, to which they include 'bk102, bk102, bk104, and bk105'. I have tried myself for a while but honestly am not sure how to do this.
Any help would be widely appreciated, sorry for the trouble and thank you in advance.
XML File
...ANSWER
Answered 2020-Oct-18 at 23:48The most simple way would be only copying the given elements with this template:
QUESTION
I’m using Oberon forms version 2019.2 CE.
I want to migrate autocomplete field to dynamic dropdown. As resource (Resource URL) I'm using address: /name={$fr-search-value}¶m2={../c_field_name}
c_field_name is other dynamic dropdown.
When I’m using autocomplete everything is fine (correct response from service), but when I switch to dynamic dropdown the response is incorrect (empty response). It looks like {../c_field_name} is empty value.
When I pass some test value to my service (instead of {../c_field_name}), for example:
...ANSWER
Answered 2020-Apr-21 at 18:45Instead of ../c_field_name
, use xxf:instance('fr-form-instance')//c_field_name
.
Also see the form attached to this message, which uses this technique to create chained dropdowns, where each dropdown passes to the service the value selected by the user in the previous dropdown. And ideally, you should be able to just write $c_field_name
, which is covered by request for enhancement #309.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install Oberon
Make sure a Qt 5.x (libraries and headers) version compatible with your C++ compiler is installed on your system.
Create an empty directory, call it e.g. Build.
Download https://github.com/rochus-keller/GuiTools/archive/master.zip and unpack to in the Build directory. Rename it to GuiTools.
Download https://github.com/rochus-keller/LjTools/archive/master.zip and unpack it to the Build directory. Rename it to LjTools.
Download https://github.com/rochus-keller/LuaJIT/archive/LjTools.zip and unpack it to the Build directory. Rename it to LuaJIT. Go to the src subdirectory and run the build script appropriate to your platform (see LuaJIT/doc/install.html for more information).
Download https://github.com/rochus-keller/MonoTools/archive/refs/heads/master.zip and unpack it to the Build directory. Rename it to MonoTools.
Download https://github.com/rochus-keller/PeLib/archive/refs/heads/OBX.zip and unpack it to the Build directory. Rename it to PeLib.
Download https://github.com/rochus-keller/Oberon/archive/master.zip and unpack it to the Build directory. Rename it to Oberon.
Goto the Build/Oberon directory and execute e.g. QTDIR/bin/qmake ObxIde2.pro (see the Qt documentation concerning QTDIR).
Run make; after a couple of seconds you will find the executable in the build directory.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page