Module: NexusParser::Tokens

Defined in:
lib/nexus_parser/tokens.rb

Defined Under Namespace

Classes: AssumptionsBlk, AuthorsBlk, BckSlash, BeginBlk, BlkEnd, CharStateLabels, ChrsBlk, CodonsBlk, Colon, Comma, Dimensions, EndBlk, Equals, FileLbl, Format, ID, LBracket, LParen, Label, LabelsBlk, LinkLine, Matrix, MesquiteBlk, MesquiteBlockID, MesquiteIDs, MqCharModelsBlk, NexusStart, NotesBlk, Number, RBracket, RParen, RespectCase, RowVec, SemiColon, SetsBlk, TaxaBlk, Taxlabels, Title, Token, TreesBlk, ValuePair

Constant Summary collapse

ENDBLKSTR =
'(end|endblock)'.freeze

Class Method Summary collapse

Class Method Details

.nexus_file_token_listObject

this list also defines priority, i.e. if tokens have overlap (which they shouldn’t!!) then the earlier indexed token will match first



237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
# File 'lib/nexus_parser/tokens.rb', line 237

def self.nexus_file_token_list
  [ NexusParser::Tokens::NexusStart,
    NexusParser::Tokens::BeginBlk,
    NexusParser::Tokens::EndBlk,
    NexusParser::Tokens::AuthorsBlk,
    NexusParser::Tokens::SetsBlk,
    NexusParser::Tokens::MqCharModelsBlk,
    NexusParser::Tokens::AssumptionsBlk,
    NexusParser::Tokens::CodonsBlk,
    NexusParser::Tokens::MesquiteBlk,
    NexusParser::Tokens::TreesBlk,
    NexusParser::Tokens::LabelsBlk,
    NexusParser::Tokens::TaxaBlk,
    NexusParser::Tokens::NotesBlk,
    NexusParser::Tokens::Title,
    NexusParser::Tokens::Taxlabels,
    NexusParser::Tokens::Dimensions,
    NexusParser::Tokens::FileLbl,
    NexusParser::Tokens::Format,
    NexusParser::Tokens::RespectCase,
    NexusParser::Tokens::Equals,
    NexusParser::Tokens::ValuePair,  # this has bad overlap with Label and likely IDs (need to kill the latter, its a lesser Label)
    NexusParser::Tokens::CharStateLabels,
    NexusParser::Tokens::ChrsBlk,
    NexusParser::Tokens::Number,
    NexusParser::Tokens::Matrix,
    NexusParser::Tokens::SemiColon,
    NexusParser::Tokens::MesquiteIDs,
    NexusParser::Tokens::MesquiteBlockID,
    NexusParser::Tokens::BlkEnd,
    NexusParser::Tokens::Colon,
    NexusParser::Tokens::BckSlash,
    NexusParser::Tokens::Comma,
    NexusParser::Tokens::LParen,
    NexusParser::Tokens::RParen,
    NexusParser::Tokens::LBracket,
    NexusParser::Tokens::RBracket,
    NexusParser::Tokens::Label, # must be before RowVec
    NexusParser::Tokens::RowVec,
    NexusParser::Tokens::LinkLine,
    NexusParser::Tokens::ID # need to trash this
  ]
end