Forgot your password?
typodupeerror
User Journal

Journal: HiLexed 2.0 - an update

Journal by I cant believe its n
Look-ahead generation is now completely automated. That is, it is precompiled on the first run, but can still be re-generated dynamically if confronted with some language that adapts how certain segments are to be parsed, for example after a function or variable declaration..

HiLexed can now compile semantic actions at any time (I could even allow these to change between invokations) and invoke as needed. Currently, only java is supported for these actions, but I am keeping my options open by making the decision on compilation strategy in a configuration file. Individual user projects should be able to override the default, but initially I will just create a working system.

Recursion is probably the final big problem to solve for this version. That is, I have parts of the problem solved, but the many different forms do not fit well together. The plan is to emulate the results of LR-parsing by annotating recursive segments with information on its form of recursion and by keeping track of recursive insertion points into the resulting list. Yes, results will be serialized since different languages have different priority for the same operators. I believe Smalltalk and NewSpeak are strictly left-to-right, whilst the wast majority of languages use standard arithmetic priority.

Upon entering a recursive segment selection, some segments are allowed and some disallowed. Upon exiting a recursive segment there is a certain set of allowed follow segments and for some even an exit segment. What is allowed differ depending on the annotations made earlier. Some segments are multi-recursive, directly or indirectly so the different rules have to be combined. Very complex but I believe solvable for deterministic grammars.
User Journal

Journal: HiLexed 2.0 comming along

Journal by I cant believe its n
HiLexed 2.0 may not be ready for the spotlight yet for a while, but I recently made a breakthough regarding the look-ahead. I can now predict very efficiently how HiLexed should parse segments and now have this baby doing left-recursion because of it. 10000 fully deterministic (and correct) predictions for java class body content in only 190ms. As most of the lower level parsing is deterministic to begin with, using reserved keywords = zero look-ahead, focus is on class-body and compound expressions. There is still one major and really complex algorithm that I need to get working in order for the 2.0 parser to run without having to send someone along each time a customer starts working on a new language.

The major problem is that as it stands now, the parser may have to go through a really large number of cases one time during "grammar-compilation" instead of as is common with other parsers, during each parse. Still, I feel (and have some ideas) that there must be a more efficient way of limiting the search without human intervention, and will be quite happy once found.
User Journal

Journal: Open Source Parser and Compilers

Journal by I cant believe its n
I am currently working on the projects below. If you are doing any similar work I would love to hear about it:

HiLexed is a simple to use, yet powerful lexical analyser / parser. Low level regular expressions are combined to match higher order constructs. With HiLexed you will succeed with your projects without spending hours on parsing.

JLeech is a Meta Compiler, borrowing / leeching binary code from different precompiled meta classes. It simplifies moving languages to the java platform.

N.A.M.E. Basic is a BASIC compiler for the java virtual machine. The N.A.M.E. project will consist of more languages eventually, but currently consists of a BASIC compiler based on HiLexed and JLeech together with a BASIC grammar. The project is functional and produces java class files.

Please download to compile a BASIC source implementation of PONG into a java binary (JRE1.5 or higher. Note: JDK not needed)

Analytical Parsing Services is a business where I provide help in developing custom parsers to clients abroad. I mostly work on custom formats, config files, RSS feeds, logs etc. Language parsing, so far, is just a hobby of mine.

I have a few ideas on how to really strenghten HiLexed and once imlemented I will also implement at least an additional language on the N.A.M.E. platform. What is nice, is that HiLexed really works well and I have not found anything I could not parse (although some problems have been really hard). Hopefully the next version of HiLexed will accept a superset grammar, with additional tree building facilities. In addition a stronger matching algorithm to go with it.
User Journal

Journal: Tax break? [Entire text in Swedish - for FRA refugees]

Journal by I cant believe its n
Skatteparadiset Campioni d'Italia

Livigno, Campione d'Italia och de italienska delarna av Luganosjön utgör undantag från den Europeiska gemenskapens mervärdesskatteområde. Campione påstås dessutom vara ett av världens minst kända och unika skatteparadis. Campione ligger i den schweiziska kantonen Ticino och är en italiensk enklav inom schweiziskt nationellt och ekonomiskt territorium. Campione är alltså helt omgivet av Schweiz men området är statsrättsligt en del av Italien. Det finns inga gränskontroller och Campione tillhör Schweiz i fråga om banker, valuta, trafik, telefon, post etcetera.

Till skillnad från i Schweiz kan utländska medborgare lätt få uppehållstillstånd eller skriva sig i Campione om vederbörande kan bevisa sig ha egendom i form av en lägenhet eller ett hus samt vistas under inte alltför kort tid i Campione. Campione lyder under italiensk skattelagstiftning men det finns specialregler för området. Det finns ingen inkomst- eller kommunalskatt eftersom Campione kan finansiera sig genom ett kasino. Campione har inga egna banker utan använder schweiziska. Till skillnad från utländska medborgare i Schweiz uppges den utländske medborgare som bosätter sig i Campione inte vara underkastad de skatteavtal som Schweiz har med USA, Kanada och EU-stater. Räntor och vinster från bankmedel, andelar, värdepapper, fast egendom och andra transaktioner på schweizisk eller internationell basis registreras inte för beskattning. Boende i Campione uppges vara skyddade från beskattning så länge som deras transaktioner går genom schweiziska banker.
Privacy

Journal: Swedish government goes after whistle blowers at FRA

Journal by I cant believe its n
One or more employees at the swedish FRA (The Defense Radio Facility) are under threat of prosecution after revealing to the media that the FRA had been illegally recording telephone and email communication for more than 10 years, according to the morning paper DN.

When this information first surfaced, shortly before the parliamentary vote on the new FRA-law, mr Max Andersson, a member of parliament asked what, if any steps would be taken to investigate this information. The Minster of Defence, mr Sten Tolgfors, then replied that he saw no reasons to go after the FRA.

Now, when the new law allowing the FRA to listen in on swedish communication has been passed, the FRA employees who blew the whistle may instead be facing charges if their identities are revealed. "Whistleblower protection is important", says the Chancellor of Justice (Justitiekanslern, JK), "but an exception can be made when it concerns national security".

The only reason for this investigation, and the only way for the prosecution to win using their argument that state secrets have been revealed, is if the swedish government and the FRA did in fact engage in illegal and unconstitutional activities (Foundation law, government form: civil rights Regeringsformen, chapter 2 - paragraph 2 and 6).

"Kill the Wabbit, Kill the Wabbit, Kill the Wabbit!" -- Looney Tunes, "What's Opera Doc?" (1957, Chuck Jones)

Working...