Oberon | Oberon parser , code model

 by   rochus-keller C++ Version: EH_MVP License: GPL-2.0

kandi X-RAY | Oberon Summary

kandi X-RAY | Oberon Summary

Oberon is a C++ library typically used in Programming Style applications. Oberon has no bugs, it has no vulnerabilities, it has a Strong Copyleft License and it has low support. You can download it from GitHub.

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

            kandi-support Support

              Oberon has a low active ecosystem.
              It has 345 star(s) with 23 fork(s). There are 16 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 1 open issues and 27 have been closed. On average issues are closed in 17 days. There are 3 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of Oberon is EH_MVP

            kandi-Quality Quality

              Oberon has 0 bugs and 0 code smells.

            kandi-Security Security

              Oberon has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              Oberon code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              Oberon is licensed under the GPL-2.0 License. This license is Strong Copyleft.
              Strong Copyleft licenses enforce sharing, and you can use them when creating open source projects.

            kandi-Reuse Reuse

              Oberon releases are available to install and integrate.
              Installation instructions are available. Examples and code snippets are not available.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of Oberon
            Get all kandi verified functions for this library.

            Oberon Key Features

            No Key Features are available at this moment for Oberon.

            Oberon Examples and Code Snippets

            No Code Snippets are available at this moment for Oberon.

            Community Discussions

            QUESTION

            Haskell's Data.Text: Good to use as basis for text editor?
            Asked 2021-Dec-17 at 00:12

            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:12

            The standard reference for editor implementation in Haskell is probably the Yi editor. Its author(s) wrote some papers discussing this, e.g.:

            • “Yi: An Editor for Haskell in Haskell” (DOI, PDF)

            • “Lazy Functional Incremental Parsing” (DOI, PDF)

            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.

            Source https://stackoverflow.com/questions/70384124

            QUESTION

            Is there an Oberon-2 compiler for Windows that supports the XYplane module?
            Asked 2021-Jul-06 at 09:53

            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:53

            Unless 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/

            https://www.miasap.se/obnc/oberon-report.html

            See also

            http://people.inf.ethz.ch/wirth/Oberon/index.html

            Source https://stackoverflow.com/questions/68057075

            QUESTION

            Dataweave error "Types `Array` and `Number` can not be compared
            Asked 2021-Mar-29 at 07:16

            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?

            Books input payload

            Detailed error description

            ...

            ANSWER

            Answered 2021-Mar-28 at 00:46

            Updating 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:

            Source https://stackoverflow.com/questions/66830052

            QUESTION

            How would I get these ID's of a specific genre in XSLT?
            Asked 2020-Oct-18 at 23:48

            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:48

            The most simple way would be only copying the given elements with this template:

            Source https://stackoverflow.com/questions/64406964

            QUESTION

            Migrate autocomplete field to dynamic dropdown
            Asked 2020-Apr-21 at 18:45

            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}&param2={../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:45

            Instead 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.

            Source https://stackoverflow.com/questions/61344573

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install Oberon

            Follow these steps if you want to build e.g. the Oberon+ IDE yourself:.
            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

            If you need support or would like to post issues or feature requests please use the Github issue list at https://github.com/rochus-keller/Oberon/issues or send an email to the author.
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries