Class: ODDB::AnalysisParse::AntibodyListParser

Inherits:
Parser show all
Defined in:
ext/analysisparse/src/antibody_list_parser.rb

Constant Summary

LINE_PTRN =
/^([CNS]|N,\s*ex|TP)?\s*Auto/mu
PARSER =
Parse.generate_parser grammar

Constants inherited from Parser

FOOTNOTE_PTRN, FOOTNOTE_TYPE, LINE_PTRN, STOPCHARS

Instance Method Summary (collapse)

Methods inherited from Parser

#footnote_line, #footnote_type, #initialize, #parse_footnotes, #parse_page, #update_footnotes

Constructor Details

This class inherits a constructor from ODDB::AnalysisParse::Parser

Instance Method Details

- (Object) parse_line(src)



26
27
28
29
30
31
32
33
34
35
36
37
# File 'ext/analysisparse/src/antibody_list_parser.rb', line 26

def parse_line(src)
  ast = PARSER.parse(src)
  desc = ''
  data = {
    :description => desc,
  }
  extract_text(ast.description, desc)
  if(node = ast.revision)
    data.store(:revision, node.value)
  end
  data
end