Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Processing data using regular expressions

91 views

Published on

This is a prototype parser that learns the structure of the data and creates a BNF structure of regular expressions.

Published in: Software
  • Be the first to comment

  • Be the first to like this

Processing data using regular expressions

  1. 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. 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. 3. Gordon Morrison – A learningparserusingregularexpressions 3 The reparsingnowfindthe “A inArija”
  4. 4. Gordon Morrison – A learningparserusingregularexpressions 4 Scrollingdownselect“Spouse”asone of the suggestions inthe Exception,leave the “Insertmatched AFTER currentposition.Reparse.”ClickOK.
  5. 5. Gordon Morrison – A learningparserusingregularexpressions 5 The parser nowfindsa CR afterworkwhenitwas expectinga“tab Spouse”.
  6. 6. Gordon Morrison – A learningparserusingregularexpressions 6

×