montepy.input_parser.tokens module#

Classes:

CellLexer()

A lexer for cell inputs that allows particles.

DataLexer()

A lexer for data inputs.

MCNP_Lexer()

Base lexer for all MCNP lexers.

ParticleLexer()

A lexer for lexing an input that has particles in it.

SurfaceLexer()

A lexer for Surface inputs.

class montepy.input_parser.tokens.CellLexer#

Bases: ParticleLexer

A lexer for cell inputs that allows particles.

Methods:

COMMENT(t)

A c style comment.

DOLLAR_COMMENT(t)

A comment starting with a dollar sign.

MESSAGE(t)

A message block.

NUMBER(t)

A float, or int number, including "fortran floats".

NUMBER_WORD(t)

An integer followed by letters.

PARTICLE_SPECIAL(t)

Particle designators that are special characters.

SOURCE_COMMENT(t)

A source comment.

SPACE(t)

Any white space.

TALLY_COMMENT(t)

A tally Comment.

TEXT(t)

General text that covers shortcuts and Keywords.

ZAID(t)

A ZAID isotope definition in the MCNP format.

begin(cls)

Begin a new lexer state

error(t)

find_column(text, token)

Calculates the column number for the start of this token.

pop_state()

Pop a lexer state from the stack

push_state(cls)

Push a new lexer state onto the stack

tokenize(text[, lineno, index])

Attributes:

COMPLEMENT

A complement character.

FILE_PATH

A file path that covers basically anything that windows or linux allows.

INTERPOLATE

An interpolate shortcut.

JUMP

A jump shortcut.

LOG_INTERPOLATE

A logarithmic interpolate shortcut.

MULTIPLY

A multiply shortcut.

NULL

Zero number.

NUM_INTERPOLATE

An interpolate shortcut with a number.

NUM_JUMP

A jump shortcut with a number.

NUM_LOG_INTERPOLATE

A logarithmic interpolate shortcut.

NUM_MULTIPLY

A multiply shortcut with a number.

NUM_REPEAT

A repeat shortcut with a number.

REPEAT

A repeat shortcut.

THERMAL_LAW

An MCNP formatted thermal scattering law.

ignore

literals

reflags

regex_module

Support for regular expressions (RE).

tokens

static find_column(text, token)#

Calculates the column number for the start of this token.

Uses 0-indexing.

Parameters:
  • text (str) – the text being lexed.

  • token (sly.lex.Token) – the token currently being processed

COMMENT(t)#

A c style comment.

DOLLAR_COMMENT(t)#

A comment starting with a dollar sign.

MESSAGE(t)#

A message block.

NUMBER(t)#

A float, or int number, including “fortran floats”.

NUMBER_WORD(t)#

An integer followed by letters.

Can be used for library numbers, as well as shortcuts.

E.g.: 80c, or 15i.

PARTICLE_SPECIAL(t)#

Particle designators that are special characters.

SOURCE_COMMENT(t)#

A source comment.

SPACE(t)#

Any white space.

TALLY_COMMENT(t)#

A tally Comment.

TEXT(t)#

General text that covers shortcuts and Keywords.

ZAID(t)#

A ZAID isotope definition in the MCNP format.

E.g.: 1001.80c.

begin(cls)#

Begin a new lexer state

error(t)#
pop_state()#

Pop a lexer state from the stack

push_state(cls)#

Push a new lexer state onto the stack

tokenize(text, lineno=1, index=0)#
COMPLEMENT = '\\#'#

A complement character.

FILE_PATH = '[^><:"%,;=&\\(\\)|?*\\s]+'#

A file path that covers basically anything that windows or linux allows.

INTERPOLATE = '\\d*I'#

An interpolate shortcut.

JUMP = '\\d*J'#

A jump shortcut.

LOG_INTERPOLATE = '\\d*I?LOG'#

A logarithmic interpolate shortcut.

MULTIPLY = '[+\\-]?[0-9]+\\.?[0-9]*E?[+\\-]?[0-9]*M'#

A multiply shortcut.

NULL = '0+'#

Zero number.

NUM_INTERPOLATE = '\\d+I'#

An interpolate shortcut with a number.

NUM_JUMP = '\\d+J'#

A jump shortcut with a number.

NUM_LOG_INTERPOLATE = '\\d+I?LOG'#

A logarithmic interpolate shortcut.

NUM_MULTIPLY = '[+\\-]?[0-9]+\\.?[0-9]*E?[+\\-]?[0-9]*M'#

A multiply shortcut with a number.

NUM_REPEAT = '\\d+R'#

A repeat shortcut with a number.

REPEAT = '\\d*R'#

A repeat shortcut.

THERMAL_LAW = '[a-z][a-z\\d/-]+\\.\\d+[a-z]'#

An MCNP formatted thermal scattering law.

e.g.: lwtr.20t.

ignore = ''#
literals = {'#', '&', '(', ')', '*', '+', ',', ':', '='}#
reflags = 66#
regex_module = <module 're' from '/home/docs/.asdf/installs/python/3.12.10/lib/python3.12/re/__init__.py'>#
tokens = {'COMMENT', 'COMPLEMENT', 'DOLLAR_COMMENT', 'INTERPOLATE', 'JUMP', 'KEYWORD', 'LOG_INTERPOLATE', 'MESSAGE', 'MULTIPLY', 'NULL', 'NUMBER', 'PARTICLE', 'PARTICLE_DESIGNATOR', 'REPEAT', 'SPACE', 'TEXT', 'THERMAL_LAW', 'ZAID'}#
class montepy.input_parser.tokens.DataLexer#

Bases: ParticleLexer

A lexer for data inputs.

Methods:

COMMENT(t)

A c style comment.

DOLLAR_COMMENT(t)

A comment starting with a dollar sign.

MESSAGE(t)

A message block.

NUMBER(t)

A float, or int number, including "fortran floats".

NUMBER_WORD(t)

An integer followed by letters.

PARTICLE_SPECIAL(t)

Particle designators that are special characters.

SOURCE_COMMENT(t)

A source comment.

SPACE(t)

Any white space.

TALLY_COMMENT(t)

A tally Comment.

TEXT(t)

General text that covers shortcuts and Keywords.

ZAID(t)

A ZAID isotope definition in the MCNP format.

begin(cls)

Begin a new lexer state

error(t)

find_column(text, token)

Calculates the column number for the start of this token.

pop_state()

Pop a lexer state from the stack

push_state(cls)

Push a new lexer state onto the stack

tokenize(text[, lineno, index])

Attributes:

COMPLEMENT

A complement character.

FILE_PATH

A file path that covers basically anything that windows or linux allows.

INTERPOLATE

An interpolate shortcut.

JUMP

A jump shortcut.

LOG_INTERPOLATE

A logarithmic interpolate shortcut.

MULTIPLY

A multiply shortcut.

NULL

Zero number.

NUM_INTERPOLATE

An interpolate shortcut with a number.

NUM_JUMP

A jump shortcut with a number.

NUM_LOG_INTERPOLATE

A logarithmic interpolate shortcut.

NUM_MULTIPLY

A multiply shortcut with a number.

NUM_REPEAT

A repeat shortcut with a number.

REPEAT

A repeat shortcut.

THERMAL_LAW

An MCNP formatted thermal scattering law.

ignore

literals

reflags

regex_module

Support for regular expressions (RE).

tokens

static find_column(text, token)#

Calculates the column number for the start of this token.

Uses 0-indexing.

Parameters:
  • text (str) – the text being lexed.

  • token (sly.lex.Token) – the token currently being processed

COMMENT(t)#

A c style comment.

DOLLAR_COMMENT(t)#

A comment starting with a dollar sign.

MESSAGE(t)#

A message block.

NUMBER(t)#

A float, or int number, including “fortran floats”.

NUMBER_WORD(t)#

An integer followed by letters.

Can be used for library numbers, as well as shortcuts.

E.g.: 80c, or 15i.

PARTICLE_SPECIAL(t)#

Particle designators that are special characters.

SOURCE_COMMENT(t)#

A source comment.

SPACE(t)#

Any white space.

TALLY_COMMENT(t)#

A tally Comment.

TEXT(t)#

General text that covers shortcuts and Keywords.

ZAID(t)#

A ZAID isotope definition in the MCNP format.

E.g.: 1001.80c.

begin(cls)#

Begin a new lexer state

error(t)#
pop_state()#

Pop a lexer state from the stack

push_state(cls)#

Push a new lexer state onto the stack

tokenize(text, lineno=1, index=0)#
COMPLEMENT = '\\#'#

A complement character.

FILE_PATH = '[^><:"%,;=&\\(\\)|?*\\s]+'#

A file path that covers basically anything that windows or linux allows.

INTERPOLATE = '\\d*I'#

An interpolate shortcut.

JUMP = '\\d*J'#

A jump shortcut.

LOG_INTERPOLATE = '\\d*I?LOG'#

A logarithmic interpolate shortcut.

MULTIPLY = '[+\\-]?[0-9]+\\.?[0-9]*E?[+\\-]?[0-9]*M'#

A multiply shortcut.

NULL = '0+'#

Zero number.

NUM_INTERPOLATE = '\\d+I'#

An interpolate shortcut with a number.

NUM_JUMP = '\\d+J'#

A jump shortcut with a number.

NUM_LOG_INTERPOLATE = '\\d+I?LOG'#

A logarithmic interpolate shortcut.

NUM_MULTIPLY = '[+\\-]?[0-9]+\\.?[0-9]*E?[+\\-]?[0-9]*M'#

A multiply shortcut with a number.

NUM_REPEAT = '\\d+R'#

A repeat shortcut with a number.

REPEAT = '\\d*R'#

A repeat shortcut.

THERMAL_LAW = '[a-z][a-z\\d/-]+\\.\\d+[a-z]'#

An MCNP formatted thermal scattering law.

e.g.: lwtr.20t.

ignore = ''#
literals = {'#', '&', '(', ')', '*', '+', ',', ':', '='}#
reflags = 66#
regex_module = <module 're' from '/home/docs/.asdf/installs/python/3.12.10/lib/python3.12/re/__init__.py'>#
tokens = {'COMMENT', 'COMPLEMENT', 'DOLLAR_COMMENT', 'INTERPOLATE', 'JUMP', 'KEYWORD', 'LOG_INTERPOLATE', 'MESSAGE', 'MODIFIER', 'MULTIPLY', 'NULL', 'NUMBER', 'PARTICLE', 'PARTICLE_DESIGNATOR', 'REPEAT', 'SOURCE_COMMENT', 'SPACE', 'TALLY_COMMENT', 'TEXT', 'THERMAL_LAW', 'ZAID'}#
class montepy.input_parser.tokens.MCNP_Lexer#

Bases: Lexer

Base lexer for all MCNP lexers.

Provides ~90% of the tokens definition.

Methods:

COMMENT(t)

A c style comment.

DOLLAR_COMMENT(t)

A comment starting with a dollar sign.

MESSAGE(t)

A message block.

NUMBER(t)

A float, or int number, including "fortran floats".

NUMBER_WORD(t)

An integer followed by letters.

PARTICLE_SPECIAL(t)

Particle designators that are special characters.

SOURCE_COMMENT(t)

A source comment.

SPACE(t)

Any white space.

TALLY_COMMENT(t)

A tally Comment.

TEXT(t)

General text that covers shortcuts and Keywords.

ZAID(t)

A ZAID isotope definition in the MCNP format.

begin(cls)

Begin a new lexer state

error(t)

find_column(text, token)

Calculates the column number for the start of this token.

pop_state()

Pop a lexer state from the stack

push_state(cls)

Push a new lexer state onto the stack

tokenize(text[, lineno, index])

Attributes:

COMPLEMENT

A complement character.

FILE_PATH

A file path that covers basically anything that windows or linux allows.

INTERPOLATE

An interpolate shortcut.

JUMP

A jump shortcut.

LOG_INTERPOLATE

A logarithmic interpolate shortcut.

MULTIPLY

A multiply shortcut.

NULL

Zero number.

NUM_INTERPOLATE

An interpolate shortcut with a number.

NUM_JUMP

A jump shortcut with a number.

NUM_LOG_INTERPOLATE

A logarithmic interpolate shortcut.

NUM_MULTIPLY

A multiply shortcut with a number.

NUM_REPEAT

A repeat shortcut with a number.

REPEAT

A repeat shortcut.

THERMAL_LAW

An MCNP formatted thermal scattering law.

ignore

literals

reflags

regex_module

Support for regular expressions (RE).

tokens

static find_column(text, token)#

Calculates the column number for the start of this token.

Uses 0-indexing.

Parameters:
  • text (str) – the text being lexed.

  • token (sly.lex.Token) – the token currently being processed

COMMENT(t)#

A c style comment.

DOLLAR_COMMENT(t)#

A comment starting with a dollar sign.

MESSAGE(t)#

A message block.

NUMBER(t)#

A float, or int number, including “fortran floats”.

NUMBER_WORD(t)#

An integer followed by letters.

Can be used for library numbers, as well as shortcuts.

E.g.: 80c, or 15i.

PARTICLE_SPECIAL(t)#

Particle designators that are special characters.

SOURCE_COMMENT(t)#

A source comment.

SPACE(t)#

Any white space.

TALLY_COMMENT(t)#

A tally Comment.

TEXT(t)#

General text that covers shortcuts and Keywords.

ZAID(t)#

A ZAID isotope definition in the MCNP format.

E.g.: 1001.80c.

begin(cls)#

Begin a new lexer state

error(t)#
pop_state()#

Pop a lexer state from the stack

push_state(cls)#

Push a new lexer state onto the stack

tokenize(text, lineno=1, index=0)#
COMPLEMENT = '\\#'#

A complement character.

FILE_PATH = '[^><:"%,;=&\\(\\)|?*\\s]+'#

A file path that covers basically anything that windows or linux allows.

INTERPOLATE = '\\d*I'#

An interpolate shortcut.

JUMP = '\\d*J'#

A jump shortcut.

LOG_INTERPOLATE = '\\d*I?LOG'#

A logarithmic interpolate shortcut.

MULTIPLY = '[+\\-]?[0-9]+\\.?[0-9]*E?[+\\-]?[0-9]*M'#

A multiply shortcut.

NULL = '0+'#

Zero number.

NUM_INTERPOLATE = '\\d+I'#

An interpolate shortcut with a number.

NUM_JUMP = '\\d+J'#

A jump shortcut with a number.

NUM_LOG_INTERPOLATE = '\\d+I?LOG'#

A logarithmic interpolate shortcut.

NUM_MULTIPLY = '[+\\-]?[0-9]+\\.?[0-9]*E?[+\\-]?[0-9]*M'#

A multiply shortcut with a number.

NUM_REPEAT = '\\d+R'#

A repeat shortcut with a number.

REPEAT = '\\d*R'#

A repeat shortcut.

THERMAL_LAW = '[a-z][a-z\\d/-]+\\.\\d+[a-z]'#

An MCNP formatted thermal scattering law.

e.g.: lwtr.20t.

ignore = ''#
literals = {'#', '&', '(', ')', '*', '+', ',', ':', '='}#
reflags = 66#
regex_module = <module 're' from '/home/docs/.asdf/installs/python/3.12.10/lib/python3.12/re/__init__.py'>#
tokens = {'COMMENT', 'COMPLEMENT', 'DOLLAR_COMMENT', 'FILE_PATH', 'INTERPOLATE', 'JUMP', 'KEYWORD', 'LIBRARY_SUFFIX', 'LOG_INTERPOLATE', 'MESSAGE', 'MODIFIER', 'MULTIPLY', 'NULL', 'NUMBER', 'NUMBER_WORD', 'NUM_INTERPOLATE', 'NUM_JUMP', 'NUM_LOG_INTERPOLATE', 'NUM_MULTIPLY', 'NUM_REPEAT', 'PARTICLE', 'PARTICLE_SPECIAL', 'REPEAT', 'SOURCE_COMMENT', 'SPACE', 'SURFACE_TYPE', 'TALLY_COMMENT', 'TEXT', 'THERMAL_LAW', 'ZAID'}#
class montepy.input_parser.tokens.ParticleLexer#

Bases: MCNP_Lexer

A lexer for lexing an input that has particles in it.

Methods:

COMMENT(t)

A c style comment.

DOLLAR_COMMENT(t)

A comment starting with a dollar sign.

MESSAGE(t)

A message block.

NUMBER(t)

A float, or int number, including "fortran floats".

NUMBER_WORD(t)

An integer followed by letters.

PARTICLE_SPECIAL(t)

Particle designators that are special characters.

SOURCE_COMMENT(t)

A source comment.

SPACE(t)

Any white space.

TALLY_COMMENT(t)

A tally Comment.

TEXT(t)

General text that covers shortcuts and Keywords.

ZAID(t)

A ZAID isotope definition in the MCNP format.

begin(cls)

Begin a new lexer state

error(t)

find_column(text, token)

Calculates the column number for the start of this token.

pop_state()

Pop a lexer state from the stack

push_state(cls)

Push a new lexer state onto the stack

tokenize(text[, lineno, index])

Attributes:

COMPLEMENT

A complement character.

FILE_PATH

A file path that covers basically anything that windows or linux allows.

INTERPOLATE

An interpolate shortcut.

JUMP

A jump shortcut.

LOG_INTERPOLATE

A logarithmic interpolate shortcut.

MULTIPLY

A multiply shortcut.

NULL

Zero number.

NUM_INTERPOLATE

An interpolate shortcut with a number.

NUM_JUMP

A jump shortcut with a number.

NUM_LOG_INTERPOLATE

A logarithmic interpolate shortcut.

NUM_MULTIPLY

A multiply shortcut with a number.

NUM_REPEAT

A repeat shortcut with a number.

REPEAT

A repeat shortcut.

THERMAL_LAW

An MCNP formatted thermal scattering law.

ignore

literals

reflags

regex_module

Support for regular expressions (RE).

tokens

static find_column(text, token)#

Calculates the column number for the start of this token.

Uses 0-indexing.

Parameters:
  • text (str) – the text being lexed.

  • token (sly.lex.Token) – the token currently being processed

COMMENT(t)#

A c style comment.

DOLLAR_COMMENT(t)#

A comment starting with a dollar sign.

MESSAGE(t)#

A message block.

NUMBER(t)#

A float, or int number, including “fortran floats”.

NUMBER_WORD(t)#

An integer followed by letters.

Can be used for library numbers, as well as shortcuts.

E.g.: 80c, or 15i.

PARTICLE_SPECIAL(t)#

Particle designators that are special characters.

SOURCE_COMMENT(t)#

A source comment.

SPACE(t)#

Any white space.

TALLY_COMMENT(t)#

A tally Comment.

TEXT(t)#

General text that covers shortcuts and Keywords.

ZAID(t)#

A ZAID isotope definition in the MCNP format.

E.g.: 1001.80c.

begin(cls)#

Begin a new lexer state

error(t)#
pop_state()#

Pop a lexer state from the stack

push_state(cls)#

Push a new lexer state onto the stack

tokenize(text, lineno=1, index=0)#
COMPLEMENT = '\\#'#

A complement character.

FILE_PATH = '[^><:"%,;=&\\(\\)|?*\\s]+'#

A file path that covers basically anything that windows or linux allows.

INTERPOLATE = '\\d*I'#

An interpolate shortcut.

JUMP = '\\d*J'#

A jump shortcut.

LOG_INTERPOLATE = '\\d*I?LOG'#

A logarithmic interpolate shortcut.

MULTIPLY = '[+\\-]?[0-9]+\\.?[0-9]*E?[+\\-]?[0-9]*M'#

A multiply shortcut.

NULL = '0+'#

Zero number.

NUM_INTERPOLATE = '\\d+I'#

An interpolate shortcut with a number.

NUM_JUMP = '\\d+J'#

A jump shortcut with a number.

NUM_LOG_INTERPOLATE = '\\d+I?LOG'#

A logarithmic interpolate shortcut.

NUM_MULTIPLY = '[+\\-]?[0-9]+\\.?[0-9]*E?[+\\-]?[0-9]*M'#

A multiply shortcut with a number.

NUM_REPEAT = '\\d+R'#

A repeat shortcut with a number.

REPEAT = '\\d*R'#

A repeat shortcut.

THERMAL_LAW = '[a-z][a-z\\d/-]+\\.\\d+[a-z]'#

An MCNP formatted thermal scattering law.

e.g.: lwtr.20t.

ignore = ''#
literals = {'#', '&', '(', ')', '*', '+', ',', ':', '='}#
reflags = 66#
regex_module = <module 're' from '/home/docs/.asdf/installs/python/3.12.10/lib/python3.12/re/__init__.py'>#
tokens = {'COMMENT', 'COMPLEMENT', 'DOLLAR_COMMENT', 'INTERPOLATE', 'JUMP', 'KEYWORD', 'LOG_INTERPOLATE', 'MESSAGE', 'MULTIPLY', 'NULL', 'NUMBER', 'NUMBER_WORD', 'PARTICLE', 'PARTICLE_DESIGNATOR', 'REPEAT', 'SOURCE_COMMENT', 'SPACE', 'TALLY_COMMENT', 'TEXT', 'THERMAL_LAW', 'ZAID'}#
class montepy.input_parser.tokens.SurfaceLexer#

Bases: MCNP_Lexer

A lexer for Surface inputs.

The main difference is that p will be interpreted as a plane, and not a photon.

Methods:

COMMENT(t)

A c style comment.

DOLLAR_COMMENT(t)

A comment starting with a dollar sign.

MESSAGE(t)

A message block.

NUMBER(t)

A float, or int number, including "fortran floats".

NUMBER_WORD(t)

An integer followed by letters.

SOURCE_COMMENT(t)

A source comment.

SPACE(t)

Any white space.

TALLY_COMMENT(t)

A tally Comment.

TEXT(t)

General text that covers shortcuts and Keywords.

ZAID(t)

A ZAID isotope definition in the MCNP format.

begin(cls)

Begin a new lexer state

error(t)

find_column(text, token)

Calculates the column number for the start of this token.

pop_state()

Pop a lexer state from the stack

push_state(cls)

Push a new lexer state onto the stack

tokenize(text[, lineno, index])

Attributes:

COMPLEMENT

A complement character.

FILE_PATH

A file path that covers basically anything that windows or linux allows.

INTERPOLATE

An interpolate shortcut.

JUMP

A jump shortcut.

LOG_INTERPOLATE

A logarithmic interpolate shortcut.

MULTIPLY

A multiply shortcut.

NULL

Zero number.

NUM_INTERPOLATE

An interpolate shortcut with a number.

NUM_JUMP

A jump shortcut with a number.

NUM_LOG_INTERPOLATE

A logarithmic interpolate shortcut.

NUM_MULTIPLY

A multiply shortcut with a number.

NUM_REPEAT

A repeat shortcut with a number.

PARTICLE_SPECIAL

REPEAT

A repeat shortcut.

THERMAL_LAW

An MCNP formatted thermal scattering law.

ignore

literals

reflags

regex_module

Support for regular expressions (RE).

tokens

static find_column(text, token)#

Calculates the column number for the start of this token.

Uses 0-indexing.

Parameters:
  • text (str) – the text being lexed.

  • token (sly.lex.Token) – the token currently being processed

COMMENT(t)#

A c style comment.

DOLLAR_COMMENT(t)#

A comment starting with a dollar sign.

MESSAGE(t)#

A message block.

NUMBER(t)#

A float, or int number, including “fortran floats”.

NUMBER_WORD(t)#

An integer followed by letters.

Can be used for library numbers, as well as shortcuts.

E.g.: 80c, or 15i.

SOURCE_COMMENT(t)#

A source comment.

SPACE(t)#

Any white space.

TALLY_COMMENT(t)#

A tally Comment.

TEXT(t)#

General text that covers shortcuts and Keywords.

ZAID(t)#

A ZAID isotope definition in the MCNP format.

E.g.: 1001.80c.

begin(cls)#

Begin a new lexer state

error(t)#
pop_state()#

Pop a lexer state from the stack

push_state(cls)#

Push a new lexer state onto the stack

tokenize(text, lineno=1, index=0)#
COMPLEMENT = '\\#'#

A complement character.

FILE_PATH = '[^><:"%,;=&\\(\\)|?*\\s]+'#

A file path that covers basically anything that windows or linux allows.

INTERPOLATE = '\\d*I'#

An interpolate shortcut.

JUMP = '\\d*J'#

A jump shortcut.

LOG_INTERPOLATE = '\\d*I?LOG'#

A logarithmic interpolate shortcut.

MULTIPLY = '[+\\-]?[0-9]+\\.?[0-9]*E?[+\\-]?[0-9]*M'#

A multiply shortcut.

NULL = '0+'#

Zero number.

NUM_INTERPOLATE = '\\d+I'#

An interpolate shortcut with a number.

NUM_JUMP = '\\d+J'#

A jump shortcut with a number.

NUM_LOG_INTERPOLATE = '\\d+I?LOG'#

A logarithmic interpolate shortcut.

NUM_MULTIPLY = '[+\\-]?[0-9]+\\.?[0-9]*E?[+\\-]?[0-9]*M'#

A multiply shortcut with a number.

NUM_REPEAT = '\\d+R'#

A repeat shortcut with a number.

PARTICLE_SPECIAL = None#
REPEAT = '\\d*R'#

A repeat shortcut.

THERMAL_LAW = '[a-z][a-z\\d/-]+\\.\\d+[a-z]'#

An MCNP formatted thermal scattering law.

e.g.: lwtr.20t.

ignore = ''#
literals = {'#', '&', '(', ')', '*', '+', ',', ':', '='}#
reflags = 66#
regex_module = <module 're' from '/home/docs/.asdf/installs/python/3.12.10/lib/python3.12/re/__init__.py'>#
tokens = {'COMMENT', 'COMPLEMENT', 'DOLLAR_COMMENT', 'INTERPOLATE', 'JUMP', 'KEYWORD', 'LOG_INTERPOLATE', 'MESSAGE', 'MULTIPLY', 'NULL', 'NUMBER', 'NUMBER_WORD', 'REPEAT', 'SPACE', 'SURFACE_TYPE', 'TEXT', 'THERMAL_LAW', 'ZAID'}#