[furcas-discussion] Parser Invariants
Thomas Goldschmidt
thomas.goldschmidt at de.abb.com
Wed Feb 16 08:44:16 CET 2011
Hi Stephan,
* Is it guaranteed that the parser does not change the textual
representation? (Seems like a obvious yes to me, but I'd like to
have your confirmation on this)
That depends on what you conceive the "textual representation". If you
mean the text that a user sees in the editor the answer is yes. Of course,
the structure of the textblocks model is altered which, however, won't
change what the user sees.
* The lexer takes the PREVIOUS version and creates the CURRENT
one. If there is an existing CURRENT version, it is discarded
first.
- What does the parser do with these two versions?
The parser uses the versions (in fact also the REFERENCE version) do
determine where the places in the textblocks model that were newly
created, modified or deleted.
- When the parser has finished, are both versions consistent views
on model
or are they somewhat different?
They are different, as the PREVIOUS version will still contain tokens that
just contain modified values an that are not lexecally analysed. E.g.,
after an insertion " bla" to the Token "test" resulting in PREVIOUS
version token "test bla" this value is still present in the PREVIOUS
version token whereas the CURRENT version may have (of course depending on
the lexer rules) two tokens "test" "bla". Therefore, after the CURRENT
version is reached the PREVIOUS version is obsolete as it is missing the
tokenisation that the lexer did.
* Is the latest CURRENT version promoted to become the new
PREVIOUS version?
No, after the CURRENT version is finished by the parser (currently after
performing a save action), the CURRENT version becomes the new REFERENCE
version. Only after a user again makes modifications to the document, a
new PREVIOUS version will be created.
* Is it dangerous to set errorMode=True in the parse run and force
the parser to inject as far as possible, even if there are
syntax errors?
This was my first try to achieve a backgound parsing. However, there were
still some problems with subsequent editings where the intermediate
version was still erronous. To answer your question, yes it is dangerous.
I cant remember what exactly the problems where when I trie to do this. Is
that what you are currently working on? to get the background parsing to
create as much of the model as possible? That would be great ;) I will try
to help you as much as my available time lets me do this.
Cheers,
Thomas
Thomas Goldschmidt
ABB AG
Forschungszentrum
Wallstadter Straße 59
68526 Ladenburg
Office Phone: +49 6203 716134
Office Fax: +49 6203 716253
e-mail: thomas.goldschmidt at de.abb.com
ABB AG
Sitz/Head Office: Mannheim
Registergericht/Registry Court: Mannheim
Handelsregisternummer/Commercial Register No.: HRB 4664
Geschäftsführung/Managing Board: Peter Smits (Vorsitzender), Joachim
Schneider, Markus Ochsner, Hans-Georg Krabbe
Vorsitzender des Aufsichtsrats/Chairman of Supervisory Board: Bernhard
Jucker
Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte
Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail
irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und
vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte
Weitergabe dieser Mail ist nicht gestattet.
This e-mail may contain confidential and/or privileged information. If you
are not the intended recipient (or have received this e-mail in error)
please notify the sender immediately and destroy this e-mail. Any
unauthorized copying, disclosure or distribution of the material in this
e-mail is strictly forbidden.
Stephan Erb <stephan at dev.static-void.de>
Sent by: furcas-discussion-bounces at lists.furcas.org
16.02.2011 00:12
To
furcas-discussion <furcas-discussion at lists.furcas.org>
cc
Subject
[furcas-discussion] Parser Invariants
Hey Thomas,
I have a few simple questions concerning incremental lexing and parsing.
* Is it guaranteed that the parser does not change the textual
representation? (Seems like a obvious yes to me, but I'd like to
have your confirmation on this)
* The lexer takes the PREVIOUS version and creates the CURRENT
one. If there is an existing CURRENT version, it is discarded
first. What does the parser do with these two versions? When the
parser has finished, are both versions consistent views on model
or are they somewhat different?
* Is the latest CURRENT version promoted to become the new
PREVIOUS version?
* Is it dangerous to set errorMode=True in the parse run and force
the parser to inject as far as possible, even if there are
syntax errors?
I ask all these questions because they are crucial when determining the
critical regions for the synchronization of the background parsing
thread.
Thanks!
Stephan
_______________________________________________
Furcas-discussion mailing list
Furcas-discussion at lists.furcas.org
http://lists.furcas.org/cgi-bin/mailman/listinfo/furcas-discussion
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.furcas.org/pipermail/furcas-discussion/attachments/20110216/23637e0e/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/gif
Size: 454 bytes
Desc: not available
URL: <http://lists.furcas.org/pipermail/furcas-discussion/attachments/20110216/23637e0e/attachment.gif>
More information about the Furcas-discussion
mailing list