8257 interfacing 2 in microprocessor for btech students
Processing data using regular expressions
1. Gordon Morrison – A learningparserusingregularexpressions 1
GordonMorrison – A learningparser using regularexpressions.
March 15, 2016
Thisis a prototype of an interactive learningparserusingregularexpressions.
Processingdatausing regularexpressions:
The top widowcontainsthe datafile onthe leftandan ASCIIdisplayonthe rightof the same data.
The two windowsacrossthe middle are the dictionaryonthe leftandthe schemadata patternonthe
right.Both are sequencesof regularexpressions.The window acrossthe bottomdisplaysmessages and
there isa TSD DictionaryConsole where regularexpressionscanbe enteredforthe dictionary.
2. Gordon Morrison – A learningparserusingregularexpressions 2
Clickingthe arrowinthe toolbarbeginsthe parsingof the data. Whenthe data doesn’tmatchthe Data
Pattern(schema) thenanerror isreportedindicatingwhatwasfoundandif a suggestioncanbe made it
isindicated.The firstrowof data has Home followedbyatab thenthe name Arija.The exception
message indicatesatab (the blue HT inthe ASCIIsection) wasfoundanda ‘0D’ was expected.Sothis
data has an optional “tabspouse name”.
Selectthe ‘Tab’inthe Exceptionleavethe “InsertmatchedAFTERcurrentposition.Reparse.”ClickOK.
3. Gordon Morrison – A learningparserusingregularexpressions 3
The reparsingnowfindthe “A inArija”
4. Gordon Morrison – A learningparserusingregularexpressions 4
Scrollingdownselect“Spouse”asone of the suggestions inthe Exception,leave the “Insertmatched
AFTER currentposition.Reparse.”ClickOK.
5. Gordon Morrison – A learningparserusingregularexpressions 5
The parser nowfindsa CR afterworkwhenitwas expectinga“tab Spouse”.