User loginNavigation |
LtU ForumRecursive Descent Parser GeneratorsI'm writing a parser generator, to avoid being TLDR (which is most of my messages) I wanted to ask if anyone knows of other LL(*) parser generators, what I should aim for performance wise (what's acceptable) and if you've had experience writing something similar what's one of the toughest nuts to crack on this style of parser? For me (more than one thing) :
If this ends up working as intended, I'll be astonished, because when I started this eight years ago, I didn't have an effing clue. I still probably don't, but I at least know what I want to do now. The grammars define no semantic predicates, nor actions on lexical matches, so the generator has to do all the work. So far (without error context) it's 50-80 times faster than my own hand-written parser for its own language, until I found that I wasn't handling lexical ambiguities on follow states and now have to fully implement them to do a proper comparison. Edit: Edit 2: Redacting the following, turns out the issue is more complex :) The sample I gave it had zero issues with :( Without code to properly identify these 'No Alt Indirect Left Recursion' states, it will recurse infinitely because there's no fall-back to choose first, it would always predict 'B' if it has: Other[]. New paper: Theory of ProgramsA simple mathematical framework, based on elementary set theory, to cover programming concepts. See http://bit.ly/1CkZBPj. -- Bertrand Meyer Lamport: Interprocess CommunicationSomething that may be pertinent to the recent (lengthy) discussion of the deep implementation details of interprocess communication is Leslie Lamport's interesting discussion of how to implement various kinds of interprocess communication. The bulk of the paper deals with various kinds of shared registers, which are taken as the primitives through which messages are passed. Starting from non-atomic operations, Lamport shows how to build atomic operations that allow message-passing to occur.
Some New Directions for ACP ResearchThis paper at ArXiv.org lists some new directions for research related to the Algebra of Communicating Processes (ACP). Most of these directions have been inspired by work on SubScript, an ACP based extension to the programming language Scala. SubScript applies several new ideas that build on ACP, but currently these lack formal treatment. Some of these new ideas are rather fundamental. E.g. it appears that the theory of ACP may well apply to structures of any kind of items, rather than to just processes. The aim of this list is to raise awareness of the research community about these new ideas; this could help both the research area and the programming language SubScript. Practical Principled FRP: Forget the past, change the future, FRPNow!A new ICFP 15 paper by Ploeg and Claessen; abstract:
Fixed link. Who can make LtU2?If we had voting on things (a la reddit, slashdot, hacker news, etc.) I think we'd all be better off. There are technological things which won't outright fix everything, but should greatly help I should think. But we'd need somebody who can actually set that stuff up. Bi-simulation in security auditingBi-simulation has been an important topic in Computer Science (e.g. intensely studied for process calculi) which may be applicable to an important emerging issue for computer engineering, namely security auditing. See bottom of page 3 of Distributed Public Recording: Providing Security Without the Risks of Mandatory Backdoors The Page-Fault Weird Machine: Lessons in Instruction-less ComputationIn case one instruction is one too many for you. A compiler which executes instructionless code through triggering pagefaults.
Dedekind, Cantor, Conway, & Hewitt (w/ some Chomsky)Here, I will attempt to cool down controversy on LtU over Hewitt's construction of Real by explaining it in more familiar terms. I think this will help to shed some light on Direct Logic and begin to hint why it is interesting in a PLT context. I will borrow conceptually from John H. Conway who wrote, in "On numbers and games":
Hewitt can be read as constructing Real by specifying a set of 3-way partitions of the dyadic fractions between 0 and 1. Every Real in [0..1] corresponds to three sets: {L | M | R} The sets are ordered so that no member of L is greater than or equal to any member of M or R, no member of M is greater than or equal to any member of R.
Zero:
0 ≡ {{} | {} | Dyad}
where Dyad is the set of all dyadic fractions between 0 and 1
One:
1 ≡ {Dyad | {} | {}}
Hopefully the dyadic fractions are themselves members of Real and we can memorialize that fact in a manner similar to Dedekind:
∀d ∈ Dyad, {dl | { d } | dr } ∈ ℝ
where dl ≡ { x ∈ Dyad | x < d }
and dr ≡ { x ∈ Dyad | x > d }
Note: the Real {dl | { d } | dr } is called d.
The rationals in general correspond to regular languages as follows:
Let Rat be the set of of sets of finite strings of 0 and 1 such that:
∀r in Rat, r is a regular language
r is well ordered by a prefix relation
∀s in r, s is finite length and ends with 1
rl ≡ { d ∈ Dyad | ∃x ∈ r, x > d }
rm ≡ { d ∈ r | ∀x ∈ r, x <= d }
rr ≡ { d ∈ Dyad | ∃x ∈ r, x < d }
Note: the Real { rl, rm, rr } is called r }
As you can see, the subset of Real given by Rat is the set of all rational fractions between 0 and 1. The rationals are given by certain regular languages over the alphabet {0,1}. Similarly, the constructible reals are given by certain recursivvely enumerable languages.
Let Tructable be the set of all recursively enumerable sets of finite
strings of 0s and 1s, each string ending with a 1, such that each member
of Tructable is well ordered by a prefix relation.
By analogous construction to the rationals:
∀ t ∈ Tructable, { tl, tm, tr } is in Real
All rationals (dyadic and otherwise) are Tructable. Finally, we consider a set of languages of finite strings for which the generator functions are non-deterministic.
Let Fracs be the set of all sets of finite strings of 0s and 1s,
each string ending with a 1, such that each member of Fracs is
well ordered by a prefix relation.
By analogous construction,
∀ f ∈ Fracs, { fl, fm, fr } is in Real
Note that if a member f of Fracs has a maximal element, then f is also a dyadic rational. Note that if a member f is a regular language over {0,1}, then it is a rational. Note that if a member of f is a recursively enumerable set, then it is a tructable real. There are other possibilities. By a diagonalization argument, we know that Fracs contains members f which are not recursively enumerable. Those f are the unconstructible reals. Let's suppose that the real world contains fair randomness. For example, there is a coin flip or some other kind of measurement we can repeat that will produce random outcomes. Neither heads or tails will be permanently starved. A sequence of coinflips on a given world-line will eventually produce both a 0 and a 1. Furthermore, on some world-lines, the sequence of coin flips is not described by any recursively enumerable function (at least assuming that there is no upper bound on the number of times we get to flip the coin). The number of possible world-lines on which coin flips might be recorded is uncountable and, indeed, corresponds nicely to the members of Fracs. In other words, a machine can enumerate the members of any f in Fracs, from shortest to longest. Such a machine, on a particular world-line, is pretty much what Hewitt means by an "Actor address". SPLASH 2015 - 2nd Combined Call for Contributions/************************************************************************************/ Pittsburgh, Pennsylvania, USA Sponsored by ACM SIGPLAN /************************************************************************************/ Co-Located Conferences: SLE, GPCE, DBPL, PLoP The ACM SIGPLAN conference on Systems, Programming, Languages and Applications: Software for Humanity (SPLASH) embraces all aspects of software construction and delivery to make it the premier conference at the intersection of programming, languages, and software engineering. SPLASH is now accepting submissions. We invite high quality submissions describing original and unpublished work. Most of the following tracks have submissions due: 30 JUNE ** Demos ** Submissions Due: 30 June, 2015 ** Doctoral Symposium ** Submissions Due: 30 June, 2015 ** Dynamic Languages Symposium (DLS) ** Submissions Due: 15 June, 2015 ** OOPSLA Artifacts ** Submissions Due: 9 June, 2015 ** Posters ** Submissions Due: 30 June, 2015 ** SPLASH-E ** Submissions Due: 30 June, 2015 ** Student Research Competition ** Submissions Due: 30 June, 2015 ** Student Volunteers ** Submissions Due: 7 August, 2015 ** Tutorials ** Submissions Due: 30 June, 2015 ** Wavefront ** Submissions Due: 30 June, 2015 ** Workshops ** Late Phase Submissions Due: 30 June, 2015 ** Co-Located Events ** SLE - 8th International Conference on Software Language Engineering (SLE) GPCE - 14th International Conference on Generative Programming: Concepts & Experiences (GPCE) DBPL - 15th Symposium on Database Programming Languages (DBPL) PLoP - 22nd International Conference on Pattern Languages of Programming (PLoP) Information: Location: Organization: By craiganslow at 2015-06-21 16:20 | LtU Forum | login or register to post comments | other blogs | 2812 reads
|
Browse archives
Active forum topics |
Recent comments
3 weeks 4 days ago
3 weeks 4 days ago
3 weeks 5 days ago
3 weeks 5 days ago
4 weeks 2 days ago
4 weeks 2 days ago
4 weeks 3 days ago
4 weeks 3 days ago
4 weeks 3 days ago
4 weeks 3 days ago